Aaarrrgghhj op I fee your frustration.
It started when I was pregame to with no 2 and got so bad I was offered a prescribed tablet used for Parkinson's but turned it down out of fear of what it could do to baby
The only thing o found worked was sitting in a cool bath and rubbing eucalyptus oil into my legs which would soothe them enough for me to fall asleep.
As soon as dd was born it disappeared thank god.
Pregnant with no 3 and it started again pretty much instantly.
I remember buying magnesium things that you put in your tongue to dissolve. That works sometimes or sometimes not.
Went away again until 6 years ago when I had thyroid removal and now unfortunately unless my thyroid hormone levels are bang on it happens a lot.
Mine get so sore and twitchy and Itchy it's unreal.
I find magnesium spray on my legs and only really soft cotton tight pj bottoms or loose ones draw attention to my legs when I'm in bed and it starts them off.
I also always have a foot poking out because I find once they get hot it also starts.
It's totally horrendous op so at times I take codiene to knock me out so I fall asleep and stay asleep when they're really bad because even if I do manage to fall asleep it wakes me up. 
I'm a hair stylist so on my feet all day every day and the pressure def doesn't help.
I also bought a leg gel from Sainsbury's randomly one day that I saw for heavy tired legs so tried that.
I run it on when I get out of the shower at night and surprisingly it works.
I also have a few extra pinches of salt some days