Period cramps can be caused by a deficiency in magnesium. This mineral helps relax the muscles and can reduce the severity of cramping. If you experience severe period cramps, it may be worth getting your magnesium levels checked by a healthcare provider.