Pain could be bcoz of wrong sleeping posture. Make sure you use proper firm pillow while sleeping which will help to keep your neck in neutral position. Avoid sleeping on your stomach. If pain still present after correcting posture than please consult nearest Physiotherapist.
Next Steps
Apply Ice pack for 20 mins to reduce pain.
Health Tips
Avoid soft pillow & mattress.