How to Treat a Hamstring Cramp

Your hamstring is a muscle at the back of your thigh that is used nearly every time you move your leg 1. When a muscle cramps, it locks up, causing immobility and severe pain 1. Hamstring cramps usually occur when you are either engaged in strenuous physical activity or sleeping 1. It is normal to feel tenderness and discomfort for an entire day after a severe cramp in your hamstring. You may not be able to dispense with hamstring cramps altogether, but you can treat them by taking steps to ease the cramp and prevent future cramping as best you can 1.

Is This an Emergency?

If you are experiencing serious medical symptoms, seek emergency treatment immediately.

Easing the Cramp

Relax your leg as soon as you feel the cramp coming. Your first response may be to tighten your leg muscles and pull your leg as close to your body as possible, but this has the potential to increase the severity and duration of the cramp.

Stretch your leg out slowly in front of you and curl your toes. Putting the injured muscle and surrounding muscles to work after being in a relaxed state can loosen the cramp 1. Stretching also reduces pressure on the hamstring and eases the pain.

Attempt a more targeted stretch if basic stretching does not relieve the pain. Place the ankle of the leg that is cramping behind the ankle of your other leg and push hard. The resulting pressure should alleviate the cramp.

Massage the muscle with your hands and apply an ice pack as soon as possible 1.

Use a topical anti-inflammatory to prevent swelling and help minimize discomfort when the cramp passes.

Preventing Cramps

Drink plenty of water. You can be dehydrated and not realize it--especially if you are physically active. Dehydration can contribute to muscle cramps 1.

Take multivitamins that contain potassium. Hamstring cramps are sometimes caused by a potassium deficiency 1.

Eat a healthy and balanced diet. An electrolyte deficiency can contribute to muscle cramps 1. While some sports drinks contain electrolytes, there is no replacement for regular healthy meals.

Increase your activity level slowly over a period of time. Overexerting your body when it is not accustomed to strenuous activity is a direct cause of many muscle cramps 1. By gradually increasing your activity level you allow your body time to adjust.

Stretch daily. Even if you do not work out regularly, daily stretching serves to condition your muscles and prevent cramps 1. If you do work out, stretch before and after exercise.

See a doctor. If the cramping is frequent and all preventative measures fail, it may be the result of an underlying medical condition.


The color of your urine will indicate whether you are properly hydrated. If you are hydrated, your urine should be pale yellow or colorless. Dark urine indicates dehydration. If your hamstring cramps occur mostly at night, take a hot shower immediately before going to bed to relax your muscles.


Seek medical attention immediately if bruising occurs or if you feel continuous muscle spasms. This may indicate a torn hamstring.