Hi . It could sudden muscle strain in pyriformis muscle.
Do pyriformis stretches, apply hot pack.
Maintain back ergonomics.
If pain increases do consult physiotherapist.
Next Steps
Lie on your back , bend both knees and keep together on bed. Now slowly cross right knee on left in position of 4. Now take the left knee towards chest. U can feel stretch in right back and lower thigh.
Health Tips
Do stretch for 3 times. Place a pillow below knees while sleeping