I had a patient come in during the week and present with a sharp pain within the neck itself.
The onset was that she woke up with it and 'slept awkwardly'.
While unfavourable positioning of the neck during sleep may be a common trigger for general neck pain, this may not always be the primary cause.
In her case what the issue was, she spent a lot of time at her desk during the week.
By reaching forward to extended periods of time, her thoracic area (ribcage) flex - causing the muscles in her neck to work in ways that they're not supposed to.
When the neck muscles are already under load from prolonged periods of tension, the neck pain can be triggered quite easily by common episodes such as sleeping in an unfavourable position.
After a thorough treatment, I sent her away with two key exercises to do throughout the day to prevent prolonged periods at her desk from causing neck problems that are easily avoided altogether!