There is a high chance that there is some nerve entrapment that has occurred in your neck due to wrong sleeping posture. Hence, there is pain in your upper back. However, complete evaluation will tell better.
Next Steps
Visit nearby physiotherapist and avoid painful movements.
Health Tips
Icing on neck and pain free neck and shoulder movements must be done 3-4 times in a day.