SymptomBones, joints & muscles
Muscle Cramps: Why They Happen and How to Stop Them
Muscle cramps are sudden, involuntary, painful contractions of a muscle that you cannot relax at will, usually lasting seconds to a few minutes. The calf ("charley horse"), foot and thigh are most often affected, frequently at night. Most cramps are harmless and linked to muscle fatigue, exercise, aging, dehydration or pregnancy. Stretching the muscle stops a cramp quickly. Frequent cramps with weakness, muscle wasting, or after starting a new medicine should be checked.
Also called: Charley horse, muscle spasms, nocturnal leg cramps, muscle contractions
At a glance
- What it is
- A sudden, painful, involuntary muscle contraction with a hard, knotted muscle.
- Common sites
- Calf, foot, thigh, hands.
- Common causes
- Muscle fatigue, exercise in heat, aging, pregnancy, prolonged sitting, dehydration.
- Medical causes
- Low potassium, magnesium or calcium; diuretics and statins; kidney disease; diabetes; thyroid disease; nerve disease.
- Relief
- Stretch and massage the muscle; heat afterward. Regular stretching prevents recurrence.
When to get help
Call 911 or go to the ER
- Severe muscle pain with very dark (cola-colored) urine after intense exercise, heat or a crush injury (possible rhabdomyolysis)
- Painful muscle spasms of the jaw, neck or whole body after a wound (possible tetanus)
- Cramps with confusion, very fast heartbeat or fainting
See a doctor within a day or two
- A calf that stays painful, swollen, warm or red between cramps (possible blood clot)
- Widespread cramps with tingling around the mouth or in the fingers (possible low calcium)
- Muscle pain, cramps and weakness after starting a statin
Book a routine appointment
- Cramps several times a week that disturb sleep
- Cramps with muscle weakness, twitching or wasting
- Calf cramping with walking that eases with rest (possible poor circulation)
- Cramps after starting a diuretic or other new medicine
Usually safe to manage at home
- An occasional night-time calf cramp that eases with stretching
- Cramps during or after hard exercise, especially in heat
What a muscle cramp feels like
A cramp strikes suddenly. The muscle becomes rock-hard and visibly bunched, and the pain is sharp and intense. Toes may curl or point. Most cramps release within seconds to a few minutes, but the muscle can feel sore and bruised for a day afterward.
A cramp is different from:
- Muscle spasm or twitching (fasciculation): small, painless flickers under the skin
- Restless legs: an urge to move the legs with uncomfortable sensations, not a hard contracted muscle
- Claudication: aching calf pain with walking from poor circulation, which eases with rest
- Dystonia: sustained twisting postures from a brain movement disorder
What causes muscle cramps
The exact mechanism of ordinary cramps is not fully understood, but they seem to come from overexcited motor nerves that fire repeatedly, especially when a muscle contracts while already shortened, such as a calf with the toes pointed in bed.
Common, usually harmless causes
- Night-time leg cramps: affect up to half of adults over 50. Shortened calf muscles while lying with toes pointed are a likely factor.
- Exercise-associated cramps: from muscle fatigue during hard or prolonged exercise, particularly in hot conditions. See heat cramps.
- Pregnancy: leg cramps are common in the second and third trimesters.
- Prolonged sitting or standing, and sitting with legs tucked under.
- Dehydration and heavy sweating.
Medical causes
| Cause | Clues |
|---|---|
| Low potassium (hypokalemia) | Diuretics, vomiting, diarrhea; weakness, palpitations |
| Low magnesium (hypomagnesemia) | Diuretics, proton pump inhibitors, alcohol, diarrhea |
| Low calcium (hypocalcemia) | Tingling around the mouth and fingers, after thyroid or parathyroid surgery, vitamin D deficiency |
| Kidney disease and dialysis | Cramps during or after dialysis |
| Hypothyroidism | Tiredness, weight gain, feeling cold, slow reflexes |
| Diabetes and peripheral neuropathy | Numbness, burning feet, cramps |
| Cirrhosis | Frequent cramps in advanced liver disease |
| Nerve and motor neuron disease | Cramps with weakness, twitching and muscle wasting (for example ALS) |
| Peripheral artery disease | Calf pain on walking, cold feet, weak pulses |
Medicines that can cause cramps
- diuretics (water pills) such as furosemide and hydrochlorothiazide
- statins (cholesterol medicines); see statin-induced myopathy
- beta-agonist inhalers such as salbutamol in high doses
- some osteoporosis medicines (raloxifene), ACE inhibitors and ARBs in some people
- stopping alcohol or some sedatives
How doctors assess frequent cramps
The doctor will ask how often cramps happen, which muscles, at what time of day, and about exercise, fluids, medicines, alcohol, and symptoms such as weakness or numbness. They will examine muscles, nerves and pulses in the feet.
Blood tests may include potassium, magnesium, calcium, kidney function, blood sugar, thyroid function and creatine kinase (a muscle enzyme). Nerve conduction studies and EMG are used if nerve or muscle disease is suspected.
How to stop a muscle cramp
- Stretch the cramping muscle. For a calf cramp, straighten the knee and pull your toes toward your shin, or stand and lean forward against a wall with the cramping leg straight behind you and heel down.
- Massage the muscle firmly.
- Walk around on the affected leg.
- Apply heat afterward to ease soreness, or ice if the muscle stays tender.
- For thigh cramps, stretch the front (pull the heel toward the buttock) or the back (straight leg, bend forward) depending on which muscle is cramping.
Preventing muscle cramps
- Stretch your calves for a few minutes before bed and several times a day. Evidence is mixed but it is low-risk and many people find it helps.
- Keep bedcovers loose so your toes are not pushed into a pointed position; or sleep with a pillow under the knees.
- Stay hydrated, especially in hot weather and during exercise.
- Build exercise gradually and warm up.
- Wear supportive shoes.
- Review medicines with your doctor if cramps began after a new prescription.
What about supplements and quinine?
- Magnesium supplements have not been shown to help typical night cramps in older adults, though they may help when magnesium is low and are sometimes tried in pregnancy.
- Quinine (including tonic water in large amounts) is no longer recommended for leg cramps in the US because of serious side effects, including blood disorders and heart rhythm problems.
- Electrolyte drinks can help exercise cramps with heavy sweating.
Frequently asked questions
What causes muscle cramps?
Most cramps are caused by muscle fatigue, exercise, especially in heat, prolonged sitting, aging and pregnancy. Dehydration, low potassium, magnesium or calcium, medicines like diuretics and statins, and conditions such as kidney disease, diabetes, thyroid disease and nerve problems can also cause them.
Why do I get leg cramps at night?
Night cramps often happen because calf muscles shorten when you lie with your toes pointed. They become more common with age, pregnancy, prolonged standing during the day and some medicines. Stretching the calves before bed and keeping bedcovers loose may reduce them.
How do you stop a charley horse fast?
Stretch the cramped muscle immediately: for a calf cramp, straighten your leg and pull your toes toward you, or stand and press the heel to the floor. Massage the muscle and walk around. Heat afterward eases leftover soreness.
Are frequent muscle cramps a sign of something serious?
Usually not, but frequent cramps can be linked to electrolyte problems, medicines, kidney or thyroid disease, diabetes or nerve disease. See a doctor if cramps happen several times a week, disturb sleep, or come with weakness, muscle wasting, numbness or dark urine.
Does magnesium help muscle cramps?
For most adults with ordinary night cramps, studies have found magnesium no more effective than placebo. It may help if your magnesium level is low. Ask your doctor before taking it, especially if you have kidney disease, as magnesium can build up.
Sources
This guide was written from current patient and clinical guidance, including:
- American Academy of Family Physicians: Nocturnal leg cramps
- American Academy of Neurology: Practice guideline on treatment of muscle cramps
- NHS: Leg cramps
- MedlinePlus: Muscle cramps
- US Food and Drug Administration: Quinine sulfate safety communication