Jelly legs
I went through a stage of this and i wish that i'd have kept a diary - what id eaten, what exercise id done, if any stressful circumstances had taken place- maybe you could do that and see if there is a pattern that emerges.
I must admit that i found taking a gentle stroll when the symptoms occurred helped. Which would mean that at 2am i was walking around my garden because my jelly legs were worse at night and id loose sleep over it. Also a long soak in the bath before bed helped.
It does make you wonder if it has anything to do with circulation - let me know if your leg twitching eases after walks, baths, leg massages.