Our bodies need electrolytes for muscle contraction, nerve signaling, bone health, and to help prevent muscle cramping. One of the primary functions of electrolytes is to maintain fluid balance, before, during, and after a tough workout. Sweat contains both water and electrolytes, which is why rehydration is so important.