Hello and welcome
The problem can be due to muscular spasm. Try Ice and hot fermentation and take complete rest till he pain subsides.
Apply local anti-inflammatory gel at the site.
and and anti-inflammatory drug to reduce pain.
Use hard bed to sleep.
If pain persist for more than 2 days feel free to consult your doctor and get your X-ray done.
Best Wishes and get well soon.