In general, magnesium is safe for most people when taken as directed. However, high doses of magnesium supplements can cause diarrhea, nausea, and stomach cramping. If you experience any side effects, stop taking magnesium and speak with your healthcare provider.