Google restless leg syndrome (RLS). It can happen with hormonal imbalance. Sometimes I feel it in my whole body, and it will wake me up at night. I use a homeopathic remedy, Restful Legs by Hyland, and it seems to help. When it gets me at night, it always helps to get up and use the bathroom (empty the bladder), take the remedy, and try to go back to sleep. It's easier for me if I sleep on my side with one leg pulled up towards my chest, and the other extended (I don't know why). It's far worse if I'm on my back. It was really bad for me last year and the year before that when I had the IUD out, and the last couple months have been a bit better, as most of my symptoms have been a bit better (but still there). It's not painful for me, but it's miserable to deal with. I remember having it sometimes when I was young and had growing pains in my legs. I think it's just something that some people get. 2 of my 4 kids have it too (a boy and a girl), and it only hit them as they reached puberty. So again I'm thinking it's hormonal.
Make sure you're getting enough magnesium too. Avoid mag. oxide and look for mag. citrate or mag. malate (the malate is the best). This is something I learned from James Sloane from the Truth in Medicine forum here on curezone.
Sorry this is so long!