This interesting review of 7 studies called a "meta-analysis" analyzed data from 286,668 participants and 10,912 people who later developed diabetes. The overall risk of developing diabetes was decreased by 14% for each 100 mg/day increase in their daily magnesium intake. As magnesium deficiency is the single most important nutritional deficiency in Americans (causing fatigue, pain, heart disease and many other problems), this is one more reason to increase nuts, beans, whole grains and green leafy vegetables. A good multivitamin powder also has 200 mg of magnesium per scoop.
"Magnesium intake and risk of type 2 diabetes: a meta-analysis," Larsson SC, Wolk A, J Intern Med, 2007; 262(2): 208-14.