Magnesium is also important to women who are pregnant, experience menopause or are at risk for osteoporosis. Getting the right amount of magnesium daily can help prevent leg cramps, migraines and fatigue. It is estimated that up to 80 percent of those with type 2 diabetes have a magnesium deficiency.