They make a drug for restless leg syndrome. Personally, this shit happens to me sometimes when lying in bed. I usually have to get up aand jog in place for like 5 minutes, lay bacdk down, get back up and do jumping jacks, lay back down, get back up and start hitting my thighs and calves with my closed fist till they're bruised and pained, then laying back down.
I feel your pain, bro. Luckily it only happens every now and then for me.