There isn't sufficient information to suggest a specific diagnosis. It is possible that it could be a muscle spasm due to improper posture while sleeping or otherwise. I would advise you to put a hot water bag over the area and massage the area gently with a topical pain killer. Kindly also aim to drink sufficient water (2.5-3 lietrs of water/day). If it doesn't resolve kindly visit the ER so that you can be examined and undergo necessary investigations to find the underlying cause and have it treated accordingly.
Next Steps
Follow the steps as advised
Health Tips
If condition persists or worsens visit the ER at the earliest