Most people can reach the recommended daily dosage through diet alone. Common foods that contain magnesium include:
legumes, nuts, and seeds
whole grains
spinach and other leafy vegetables
fortified breakfast cereals and other fortified foods
yogurt, milk, and other dairy products
If a person has low magnesium levels or magnesium deficiency, a doctor may recommend either increasing their dietary intake of magnesium or taking magnesium glycinate supplements.