Don't worry this is typical case of overstretched neck muscles during sleep. If pain is 7+ on a scale of 1-10 have an aceclofenac tablet and keep the area warm to relax muscles.
You can also use hearing pad or a towel soaked in warm water.
Next Steps
Do some neck and shoulder movements , start with should first , I'm assuming one side is more painful than other , apply some diclo gel over the area and start some stretching of next muscles slowly, use hands if needed.
Health Tips
. You should take a look at your sleeping posture to avoid further discomfort.