Neck pain and stiffness is extremely common and can be caused by trivial things such as the way you sit in the day and sleep at night.
The optimum position for your neck is to be in neutral, but some of you like to use one too many or not enough pillows when sleeping. This will cause head tilt and the muscles in your neck to overload. Overload of these muscles will cause them to shorten, thus become tighter and reduce your range of motion, as well as become a cause of discomfort.
If your neck is either tilting down or up when laying in bed, I advise that you check you're using the right depth of pillow, as this could be the cause of your neck pain.