Although magnesium deficiency is a very common cause of cramps, there are other causes too. Please see this list: https://symptoms.rightdiagnosis.com/cosymptoms/muscle-cramps-all.htm