the best way to get magnesium (short of food) is transdermal magnesium chloride
(google it) you can buy nigari(which is magnesium chloride used in tofu making) at some asian markets and there are some online vendors, i get mine from herbalhut but im sure there are alternatives. transdermal mag chloride has completly rid me of my eye twitches and muscle cramps, plus i feel calmer.