I have Restless Leg Syndrome (RLS) which includes the uncontrollable need to move my legs, and surprisingly, other parts of my body also. I take Mirapex which helps greatly. My PCP and Neuro both feel this is the way for me to go because it was so severe. I also suffer from severe insomnia because of it. I'm not suggesting that you need to be medicated, but I do recommend that you talk to you physician about it, because it can be very dibilitating. Try some cool compresses and maybe Tylenol when it is too much to bare. But, PLEASE talk to your doctor.
Does it feel like you HAVE to move them?
Chances are, you have Restless leg syndrome. There are many many reasons people can get it.
Are you taking any medications?
If not, then something that does help almost all people with RLS is soaking in a tub of hot water before bed. Also, there are natural things you can buy that deals with it.
Here is a link for something natural that can help, which I am only suggesting first because using herbs/vitamins/minerals for something is better than medications (and that is ONLY my opinion).
http://www.mothernature.com/Library/Bookshelf/Books/23/126.cfm
Other people can help on this site if I was of no help, and even if I was :-)