Magnesium helps maintain normal muscle and nerve function. Dietary imbalances such as high intakes of fat and/or calcium can intensify magnesium inadequacy, especially under conditions of stress, whether physical or emotional. Eating a wide variety of legumes (beans and peas), nuts, whole grains, and green vegetables (magnesium is the center of the chlorophyll molecule) will help you meet your daily dietary need for magnesium.