Medically reviewed by Kristie Reed, PharmD Magnesium and potassium are important for muscle contraction, heart rhythms, and ...