Most such pains are due to bad sleeping or sitting posture leading to muscle sprain or spasm.
Sometimes it could be due to nerve compression.
Next Steps
Take mild anelgesics with Antacid and hot fomentation.
Health Tips
If pain persists then consult a Neurospine specialist.