Sounds like a muscle spasm. I woke up in the middle of the night one time and moved my neck and that was the end of my sleep for the night.
Went to the Dr.'s to see what it was and she said it was a muscle spasm, and that they can last anywhere from a few hours to 2 weeks....good luck.