The situation you sleep in at nighttime may affect your neck. Sleeping on your side or your again (supine) can set fewer pressure on the neck than sleeping on your belly (inclined). On the other hand, in aspect sleeping, the alignment of the thoracic and cervical spine is very important https://www.theorthopaedicandpainpractice.com/chronic-neck-and-shoulder-pain-relief-strategies-to-reduce-discomfort/