Welcome to the boards! Yes, Magnesium can help restless legs in some/many people. Deficiencies don't usually show up in the lab tests and doctors don't think to consider the possibility.
With regard to magnesium though...simply supplementing may not be the answer. I would suggest you do an advanced search of this board for more info!!
Other things can contribute to rls also....med side effects and unknown causes come to mind.