Hi,
As per your question it's a sudden onset pain from your hips to leg.. is it on both the legs.. do you have any weakness or numbness on your legs.. is it a sharp pain..
At home you can try this stretch for piriformis muscle..
Lift your left leg and place your right knee on top of the left knee. Hold the position for few seconds. This can help relieve pain. Do the same for other leg. Do ten reputations twice a day. Continue for 5 days. If pain has not reduced please consult orthopedician and physiotherapist
Next Steps
please make sure you maintain a proper posture during day time and sleep.
Health Tips
back and core abdominal strengthening ex , low back stretches, proper back support, drink plenty of water.
your condition seems like sciatica .. for further management if more pain.. please meet your orthopedician and physiotherapist.
take care
Thanks & Regards
Dr.Balu Manohar R