Muscle cramps are such a workout buzz kill. The tightness, the pain, the lingering tingle— oh my! We asked our Fitness Expert Kristy Wilson to share tips for preventing dreaded muscle cramps or, if worst comes to worst, what to do if we get them.

Expert’s Take

Kristy Wilson, NSCA, NASM: Muscle cramps (also known as charley horses) are extremely painful involuntary muscles contractions or spasms that occur in one or more of our muscles. While it is not completely understood what causes muscle cramps, we do know that muscle cramps are often associated with dehydration. Muscle cramps can also be tied to overexertion and occur when muscles are fatigued. Other contributing factors: fluid loss, electrolyte imbalance, and lack of blood flow to the muscles.

To help avoid cramping up mid-workout, try taking some of the following preventative measures:

Check for any nutrient deficiencies: A deficiency in potassium, magnesium, sodium, or calcium can contribute to muscle cramps. Be sure you are getting adequate amounts of these minerals in your diet. [For potassium, The Greatist Team recommends a swig of coconut water or snacking on a banana.]

Stay hydrated: Drink adequate amounts of fluids each day. Don’t wait until you are thirsty to consume liquids— thirst is already a sign of slight dehydration. Make it a habit to carry a bottle of water at all times and drink from it regularly throughout the day.

Stretch: A tight muscle is more prone to cramp. Stretching before and after physical activity can be beneficial in helping to keep muscles from becoming excessively tight, thereby reducing the risk of cramping.

Too late? Many times muscle cramps can be eased with stretching and gentle massage. When it feels as though a muscle may be beginning to cramp, slow down the activity and try to consume fluids and electrolytes. Once a muscle has cramped it’ll be more prone to cramping in the future so work on implementing the above tips to limit the chances of experiencing a muscle cramp in the first place.