waking up with leg pain

every time i go to sleep i get woken up with the WORST pain all the way from my thighs to my feet. it's awful i can't move. throughout the day it hurts in my thighs but it comes and goes. but every single time i sleep this happens. why the heck is this happening