Yes, you can take magnesium during pregnancy. However, you should consult your doctor before taking it. The German Nutrition Society, for example, recommends a daily magnesium intake of 310 mg for pregnant women. However, you should always pay attention to the dosage during pregnancy, as a large amount of magnesium can cause diarrhoea or at least loose stools. This is mainly because magnesium relaxes the muscles and thus softens the intestinal musculature, for example.