Muscle Cramps Low magnesium, which is particularly common in diabetics, may cause muscle cramps. You may take an over-the-counter magnesium supplement. You may also soak in Epsom salts, which are magnesium salts. Add a cup to a warm bath and soak in it for half an hour—the magnesium will be absorbed through your skin.