I don't have a bad problem with it, not as bad as it sounds with you, but I've found that not sitting down for a long time before bed helps. If I sit watching a movie before bed than by the time I try to sleep I can't keep my legs still.
I've also found that no pressure on my legs help, like DH learnt the hard way that he can't put his legs anywhere near mine when trying to sleep(it only took a few kicks )
HTH