In a recent study, scientists tracked roughly 200,000 men and women for 28 years. Those who reported getting the most magnesium from their food and supplements had a 15 percent lower risk of type 2 diabetes than those who reported getting the least.