There is evidence that magnesium deficiency can cause restless legs and leg cramps. We recommend rubbing magnesium oil on your legs before bed.