This happens to me a lot, since I have lower back issues.
What I do, if my neck not only hurts but also feels stiff...is place an ice pack on it for at least 30 minutes. It will loosen the muscles/reduce any "swelling" that may be there. You should then be able to "pop" your neck.
It sounds like your neck was at an angle while you slept; or the bones are slightly out of place, possibly due to the same thing happening in the lower back; or you have some nerves pinched.
This idea, or something similar, should be an easy & cheap remedy. Unless you really enjoy going to the chiropractor. /ubbthreads/images/graemlins/smile.gif
Even after you feel your neck "pop", it still may hurt for a few hours, until the muscles relax fully.
I'm no doctor. This is just what works for me. Been living with back issues for 25 years, & I hate to go to the bone-cracker. /ubbthreads/images/graemlins/smiliesmack.gif /ubbthreads/images/graemlins/laugh.gif
Good luck! /ubbthreads/images/graemlins/grinning-smiley-003.gif