Proper hydration and a balanced diet are important for maintaining electrolyte levels. Low electrolyte levels, especially calcium, potassium and magnesium, can cause muscle cramps and weakness.