Most likely not, although you should seek an examination by a doctor just to be sure. What people think is a trapped nerve in their neck, can be called "Wry Neck" which is a sudden acute pain in the neck, most often after a period of not moving - such as sleeping. This can be very painful for a while, until the movement and flexibility returns to your neck. Use heat therapy and some simple movement exercises to help.