Muscle cramps are a complicated phenomenon that are associated with several factors: dehydration, glycogen depletion, overexertion, fatigue, hyperthermia, etc. For more information, see What causes muscle cramps?.
While electrolyte (potassium and sodium) depletion in the blood can trigger muscle cramps, cramps can also happen with normal levels of electrolytes. Furthermore, because blood concentrations of potassium do not typically differ between people who experience cramps during exercise and people who do not,[1] the current evidence shows that low blood potassium is unlikely to cause exercise-associated muscle cramps.