The role of magnesium in preventing heart disease and kidney stones is most widely accepted. Individuals who die suddenly of heart attacks have been shown to have very low levels of magnesium in their bodies. Magnesium is extremely important to the heart, in terms of both energy production and heart muscle contraction. A magnesium deficiency may cause a heart attack by producing a spasm of the coronary arteries, thereby reducing the flow of blood and oxygen to the heart. Magnesium also increases the solubility of calcium in the urine, thereby preventing stone formation. Supplementing magnesium in the diet helps prevent the recurrence of kidney stones.