I dealt with this for years, and for a long time I did a mix of stretching and a hot shower before bed, which seemed to help somewhat. Sugar, caffeine, and alcohol seemed to be the triggers for me, so cutting those also helped. But it was always still an on and off issue. It'd be good for a few weeks and then come back for a few weeks.
We moved a little over two years ago and I decided to bring it up again to my new doctor. She prescribed me pramipexole (Mirapex). I was hesitant to try it and was worried about having to regularly up my dosage, but I've never had to. As long as I take it 2-3 hours before bed and don't have too much sugar, caffeine, or alcohol in the evening it's a miracle drug (for me at least) - basically zero symptoms in the two years I've been taking it. Sounds like this isn't always the case, but it's been absolutely amazing how well it's worked for me. There's pretty much nothing more frustrating than not being able to sleep.