http://orthomolecular.org/resources/omns/v09n05.shtml
"Magnesium"
"Kidney stones and magnesium deficiency share the same list of causes, including a diet high in sugar, alcohol, oxalates, and coffee. Magnesium has an important role in the prevention of kidney stone formation.[14] Magnesium stimulates production of calcitonin, which draws calcium out of the blood and soft tissues back into the bones, preventing some forms of arthritis and kidney stones. Magnesium suppresses parathyroid hormone, preventing it from breaking down bone. Magnesium converts vitamin D into its active form so that it can assist in calcium absorption. Magnesium is required to activate an enzyme that is necessary to form new bone. Magnesium regulates active calcium transport. All these factors help place calcium where it needs to be, and not in kidney stones.
One of magnesium's many jobs is to keep calcium in solution to prevent it from solidifying into crystals; even at times of dehydration, if there is sufficient magnesium, calcium will stay in solution. Magnesium is a pivotal treatment for kidney stones. If you don't have enough magnesium to help dissolve calcium, you will end up with various forms of calcification. This translates into stones, muscle spasms, fibrositis, fibromyalgia, and atherosclerosis (as in calcification of the arteries). Dr. George Bunce has clinically demonstrated the relationship between kidney stones and magnesium deficiency. As early as 1964, Bunce reported the benefits of administering a 420 mg dose of magnesium oxide per day to patients who had a history of frequent stone formation.[14,15] If poorly absorbed magnesium oxide works, other forms of better-absorbed magnesium will work better.
"Magnesium citrate is a good choice: easy to find, relatively inexpensive and well absorbed."