How sodium, potassium, and magnesium concentrations maintain intracellular fluid balance and prevent muscle cramping.