Whether you call them cramps, stitches, or just pains in the butt, muscle spasms put a serious damper on any workout—especially considering they usually strike without warning.

No one is immune to muscle cramps. Your calf muscles, hamstrings, quads, arms, and abs are most likely to be affected. There are plenty of possible culprits too, including being dehydrated, having poor blood circulation, not stretching enough, or just fatiguing your muscles. The news only gets worse: Cramps can occur up to (talk about a sneak attack!); the notorious often happens in the middle of the night—and you thought nightmares were bad. Luckily, scientists have found things you can do to prevent and stop muscle cramps in their tracks

Prevent Cramps

  • Drinks lots of water. Many dehydration is a leading cause of muscle spasms. Plus, there are so many other upsides to drinking more water.
  • Fill up on electrolytes. Low levels of sodium and potassium could be the reason for that side stitch. . Jung, A.P., Bishop, B.A., Al-Nawwas, A., et al. University of North Carolina at Charlotte, Charlotte, NC. Journal of Athletic Training, 2005 Apr-Jun; 40(2): 71–75. So down some Gatorade or better yet, grab a banana.
  • Try a vitamin. Studies suggest magnesium, zinc, and vitamins B, D, and E can limit the likelihood of getting a muscle cramp (or at least ease the pain). El-Hennawy AS, Zaib S. American journal of therapeutics, 2011, Mar.;17(5):1536-3686.
    Katzberg HD, Khan AH, So YT. Neurology, 2010, Mar.;74(8):1526-632X.
    Kugelmas M. Journal of the American College of Nutrition, 2000, Mar.;19(1):0731-5724.
    . Liang, R. The Journal of the Canadian Chiropractic Association, 1985 June; 29(2): 90–91.
  • Jump around. When small nerves in our muscles get fatigued, cramping can occur. Luckily, jumping drills (a.k.a. ) keep these nerves from tiring. Do them a few times a week after working out to help prevent spasms.
  • Warm up and cool down. A proper warm-up and cool-down, including plenty of stretching, can . So make sure to carve out time to get your body moving before working out and relax your muscles once you're done.
Woman Stretching

Treat Cramps

  • Stretch the spot. Once the spasms start, stop, drop, and streeetch. Or treat yo’self with a massage to really hit the knot.
  • Take a chill pill. When muscle cramps strike, take a break. Trying to push through the pain often makes the cramps worse and more severe. Schwellnus MP, Drew N, Collins M. British journal of sports medicine, 2010, Dec.;45(8):1473-0480.
  • Hit the pharmacy. may help combat soreness from muscle spasms. Vinciguerra G, Belcaro G, Cesarone MR. Angiology, 2006, Jul.;57(3):0003-3197. It’s always best to check with a doctor first, of course, before making this your go-to fix.
Expert-approved
READ THIS NEXT: 23 All-Too-Real Thoughts That Go Through Your Head During Yoga Aaptiv phase 2 promo