In my experience there are two main reasons for restless legs:
1 - Lack of movement. Your legs might want to run or dance.
2 - Accumulation of toxicity by stagnation.
1 - Usually people suffering from restless legs are not able to move as much as they wish they could. If this is the case with you, try a combination of hot foot bath detoxifying with baking soda, following some kind of either active leg action such as going up and down a staircase, or passive leg movements on a machine which can provide your body with a fair amount of vibration to help both lymphatic and blood circulation while activating your nervous system. A hot foot bath with baking soda before bed will melt and drain the accumulation of acid crystals at the nerve endings at the bottom of your feet. This will bring calm and deeper rest while sleeping.
2 - If you are mobile and active and still suffering from restless legs at night, it would be because of excess accumulated stress in your nervous system, which is released naturally as you fall asleep. If you try to fall asleep while too tired, and still pumped up with adrenaline, your nervous system is not able to make you fall asleep fast enough and your body falls asleep before your mind. Then your body would discharge through tremors, preventing you from falling asleep. In that case, you need to change your chemistry by cultivating your production of serotonin and inhibiting the production of adrenaline. This is done through the Sunning practice, which will work progressively as you learn to change your stress-induced attitude by a calmer serotonin-induced attitude of taking the time to rest more and stop running.