Magnesium prevents muscle spasms of the heart blood vessels, which can lead to a high blood pressure and a heart attack. Magnesium prevents calcium buildup in cholesterol plaque in arteries, which leads to clogged arteries. Magnesium levels are inversely associated with cardiovascular disease risk. Magnesium also helps direct calcium into the bones and out of the soft tissue within the body.