Navigation

Exercise-induced cramp


Expert reviewer, Dr Leon Creaney, Sports & Exercise Medicine Consultant
Next review due March 2021

Have you ever felt the painful spasm of a muscle cramp while exercising or shortly afterwards?

Here we’ll look at what a muscle cramp is, how to treat it, and if there are ways to prevent it happening in the first place.

Cyclists stretching

What is cramp?

A muscle cramp is when your muscle goes into a hard, tense, painful state and you can’t relax it.

Although any muscle can go into spasm, muscle cramps mostly affect the muscles in your:

  • calf (gastrocnemius)
  • foot
  • front of your thigh (quadriceps)
  • back of your thigh (hamstrings)

The pain usually dies down after a few minutes but sometimes it can last for up to 10 minutes. And your muscle can feel tender for up to 24 hours after. A muscle cramp can come back a few times before eventually getting better.

What causes muscle cramps?

Sometimes you can get a muscle cramp for no apparent reason, often at night. But exercise is frequently a factor – you may get muscle cramps during or immediately after exercise. Although almost everyone will experience a muscle cramp at some time in their life, some things can increase your risk of getting one and how bad it is. These include:

  • tight calf muscles – for example, from not stretching or from being very active
  • dehydration – when you haven’t taken in enough fluids
  • an imbalance of electrolytes in your body – for example, having low levels of potassium or magnesium
  • a health condition that affects your nerves or a metabolic disorder (a problem that disrupts how your body converts food to energy)

Strenuous exercise can bring on a muscle cramp and some types of medicine can make you more likely to get one too. These include things like beta blockers, statins and water tablets (diuretics).

How do I stop muscle cramps?

Gently and slowly stretch the affected muscle and hold it for several seconds until it relaxes. You might need to do this several times until the cramp goes away.

Muscle: Calf (gastrocnemius)
Stretch: Stand in a lunge position with your affected leg stretched out behind you and push your heel towards the ground.

Muscle: Front of your thigh (quadriceps)
Stretch: Stand upright and lift your ankle towards your buttocks while holding the top of your foot. Pull your heel gently in towards your buttocks to stretch. Hold for 30 seconds.

Muscle: Back of your thigh (hamstrings)
Stretch: Sit up straight on the ground with both legs extended straight in front of you. Put your palms on the ground and slide your hands toward your ankles. Hold for 30 seconds.

Muscle: Small muscles of your foot
Stretch: Hold your toes and pull them upwards to stretch your foot. You could also try walking around.


It might help if you:

  • gently rub and massage your muscle
  • try to have a walk around to get your blood flowing
  • drink some water 

How can I prevent muscle cramps?

Warm up and stretch

Have a gentle warm-up before you get into any intensive exercise. It’s thought that warming up and stretching your muscles reduces your likelihood of developing cramp. Although studies haven’t found this to be definitely true, it’s probably worth giving it a go – you might find it helps.

Keep hydrated

Drink enough water while you exercise and afterwards, particularly in hot conditions. It’s always important to stay properly hydrated when you’re exercising.

How much you need to drink varies hugely from person to person so it simply isn’t possible to give exact amounts. Instead, keep an eye on the colour of your urine because this is a really useful indicator of how hydrated you are.

Image showing hydration level by urine colour

Get your electrolytes in balance

If you’re sweating a lot when you’re exercising, you can lose electrolytes such as sodium (salt). It’s not known for certain but this may cause cramp, so you could try replacing the electrolytes you lose with sports drinks. If you’re doing moderate amounts of exercise, you probably won’t need them. It’s only if you’re doing a lot of strenuous training that they may be useful. If you’d like more information on this, take a look at our topic Keeping hydrated for exercise.


About our health information

At Bupa we produce a wealth of free health information for you and your family. We believe that trustworthy information is essential in helping you make better decisions about your health and care. That’s why our content is produced to the highest quality standards. Look out for the quality marks on our pages below. You can find out more about these organisations and their standards on The Information Standard and HON Code websites.

Information standard logo  This website is certified by Health On the Net Foundation. Click to verify.

Learn more about our editorial team and principles >

Related information

Tools and calculators

    • Muscle cramps. The MSD Manuals. www.msdmanuals.com, last full review/revision July 2016
    • Muscle cramps. BMJ Best Practice. bestpractice.bmj.com, last updated 10 November 2017
    • Muscle cramps. PatientPlus. patient.info/patientplus, last checked 28 January 2016
    • Muscle cramps. American Academy of Orthopaedic Surgeons. orthoinfo.aaos.org, last reviewed June 2017
    • Personal communication, Dr Leon Creaney, Sports & Exercise Medicine Consultant, 15 February 2018
    • Sports nutrition. American Academy of Orthopaedic Surgeons. orthoinfo.aaos.org, last reviewed December 2014
  • Reviewed by Rachael Mayfield-Blake, Freelance Health Editor, March 2018
    Expert reviewer, Dr Leon Creaney, Sports & Exercise Medicine Consultant
    Next review due March 2021



Has our health information helped you?

We’d love to know what you think about what you’ve just been reading and looking at – we’ll use it to improve our information. If you’d like to give us some feedback, our short survey on the right will take just a few minutes to complete. And if there's a question you want to ask that hasn't been answered here, please submit it to us. Although we can't respond to specific questions directly, we’ll aim to include the answer to it when we next review this topic.



ajax-loader