If you strain the muscles or ligaments in your neck during sleep, you may wake up with a stiff neck. In most cases, this pain goes away after a day or so. However, if you notice that you are frequently waking up with neck pain, you may be resting on an unsupportive pillow. To get a better night’s sleep, make sure that your pillow is not too high or too low. The goal is to keep the neck and head aligned with the shoulders, spine, and hips.