It is important to be aware of posture as a major contributor to chronic neck pain between sitting and sleeping. First thing you should do is to lie on your back with a pillow under the head and neck. From there, you can move the pillow up or down, forward, or backward to distribute pressure. To relieve tension in your neck before you go to bed, do some gentle stretches while warming up by 10-15 minutes of walking or stretching. You might also consider doing yoga at this time also for further relief from muscles tension and release.