Health Daily Advice
Body & conditions · Sleep

Why Do My Legs Cramp at Night? Causes and Relief

Woken by a seizing calf muscle in the small hours? Why night leg cramps happen, how to stop one fast, and when they need a doctor's attention.

Published
Reading time
5 minutes
Sources
11 cited
Cover: why your legs cramp at night — about 60% of people report nocturnal leg cramps, most often a sudden painful seizing of the calf muscle
In this guide

Most night leg cramps are harmless: a calf or foot muscle suddenly seizes while you sleep, often linked to tired muscles, dehydration, long sitting or pregnancy. Stretching the cramped muscle usually eases it within minutes. See a doctor if cramps are frequent, regularly disturb your sleep, last longer than 10 minutes, or come with swelling, numbness or weakness.

What is a nocturnal leg cramp?

A night leg cramp — sometimes called a charley horse — is a sudden, involuntary tightening of a leg muscle during sleep that will not release on its own. It most often strikes the calf, though the feet or thighs can cramp too, and the muscle can stay knotted and intensely painful for seconds to a few minutes (MedlinePlus).

They are very common: about 60% of people report experiencing nocturnal leg cramps, and they are more prevalent in women and older adults (Sleep Foundation). The NHS describes them as common and usually harmless, and notes that after the cramp stops, the muscle might feel sore for up to 24 hours (NHS).

Why do cramps strike at night?

Several things conspire after dark. NHS inform notes that abnormal nerve activity during sleep, excessive strain on leg muscles, and sudden restrictions in blood supply may all play a part, and that tendons naturally shorten as we age — which may explain why older people are particularly affected (NHS inform).

Your sleeping position matters too. Sleeping with your toes pointed downwards shortens the calf muscles and keeps them in a contracted state. NHS inform suggests that if you lie on your back, you should keep your toes pointing upwards, and if you lie on your front, hang your feet over the end of the bed — plus keep sheets and blankets loose so your feet are not forced into a pointed position (NHS inform).

And often, there is simply no clear reason. The Mayo Clinic says that most of the time there is no known cause for night leg cramps, and they are likely the result of tired muscles and nerve issues (Mayo Clinic). Cleveland Clinic likewise describes many cramps as “idiopathic”, possibly caused by involuntary nerve discharges or reduced blood flow to the muscle (Cleveland Clinic).

The most common causes of night leg cramps

The causes below are the ones the major health sources list most consistently:

  • Muscle overuse or fatigue. Hard exercise, long days on your feet, or standing on hard floors leaves muscles more irritable by nightfall. MedlinePlus calls straining or overusing a muscle the most common cause of cramps, and the NHS notes exercise strain is worse in hot or humid weather (MedlinePlus; NHS).
  • Long periods of sitting. A desk job, poor posture during the day or long spells on your feet can all contribute, according to the Cleveland Clinic (Cleveland Clinic).
  • Dehydration and electrolyte shifts. Not drinking enough fluids, heavy sweating, or low levels of magnesium, potassium or calcium can make muscles more likely to spasm. The Sleep Foundation notes that staying hydrated may reduce cramp frequency, though it cautions that nocturnal cramps are not always linked to dehydration (Sleep Foundation).
  • Medicines. Some medicines have leg cramps as a side effect — the NHS lists medicines for lowering cholesterol (statins) and high blood pressure (diuretics), and the Sleep Foundation adds steroids and antidepressants. If cramps start after a new prescription, speak to your pharmacist or GP rather than stopping the medicine yourself (NHS; Sleep Foundation).
  • Pregnancy. Leg cramps are especially common in the later stages of pregnancy (NHS).
  • Age. The risk increases with age, partly because muscles and nerves change over time (Mayo Clinic).
  • Underlying conditions. Less commonly, frequent cramps are associated with conditions such as diabetes (including diabetic nerve damage), kidney disease, thyroid problems, peripheral artery disease, peripheral neuropathy or circulation disorders. These need a doctor to assess — cramps alone do not mean you have one of these (Mayo Clinic; Sleep Foundation).

Is it leg cramps or restless legs syndrome?

The two are often confused but are different conditions. Night leg cramps cause sudden, intense pain in a visibly tightened muscle, usually lasting under 10 minutes, and stretching the muscle helps. Restless legs syndrome, by contrast, brings an uncontrollable urge to move the legs when falling asleep — muscle pain is less common and symptoms last longer (Mayo Clinic; Sleep Foundation).

If you are unsure which you have, the Sleep Foundation suggests tracking your symptoms in detail and taking those notes to your doctor, as the conditions can be difficult to tell apart (Sleep Foundation).

How to stop a leg cramp quickly

When a cramp hits, most ease within a few minutes. The NHS says stretching and massaging the muscle may ease the pain during a cramp, and that standing up and putting your weight on the leg may also help (NHS). The Mayo Clinic advises stretching the leg and flexing the foot up towards the face, massaging the muscle with ice, walking or shaking the leg, and taking a hot shower or warm bath with the water pointed at the cramped muscle (Mayo Clinic).

Step-by-step relief routine for a night leg cramp: stretch the calf, massage the muscle, stand and put weight on the leg, then use warmth
Quick relief routine for a night leg cramp (Sources: NHS, Mayo Clinic)

For lingering soreness afterwards, the NHS notes that paracetamol (known as acetaminophen in the US) or ibuprofen can help ease muscle soreness after a cramp, though they will not help during the episode itself as they take too long to work. Talk to a pharmacist if you are unsure what is suitable for you (NHS).

How to reduce night leg cramps

  • Stretch before bed. Regular calf-stretching exercises may reduce how often cramps happen. The NHS recommends a wall-stretch routine: face a wall with feet flat on the floor, lean forward until you feel your calves stretch, hold for 2 or 3 seconds, and repeat for 5 minutes, 3 times a day — with the last session just before bed (NHS). Research cited by the Sleep Foundation suggests a nightly stretching routine helps reduce cramps and leg pain after about six weeks (Sleep Foundation).
  • Stay hydrated, limit alcohol and caffeine. The Mayo Clinic advises drinking plenty of fluids but limiting alcohol and caffeine (Mayo Clinic).
  • Loosen your bedding. Keep sheets and blankets loose at the foot of the bed, and position your feet so the calves are not held in a shortened, pointed position (NHS inform).
  • Move gently before bed. A few minutes of light exercise — such as riding a stationary bike — before bedtime may help prevent cramps, and wearing supportive footwear during the day is also recommended (Mayo Clinic).
  • Eat a balanced diet. MedlinePlus notes that exercising within your ability and keeping up potassium intake from foods such as orange juice and bananas can help when fluids alone are not enough (MedlinePlus).

When to see a doctor

Night leg cramps are usually a nuisance rather than a danger. See a GP if your cramps are disturbing your sleep, if you also have numbness or swelling in your legs, or if cramps last longer than 10 minutes (NHS). MedlinePlus adds that you should seek care for cramps that are severe, happen frequently, do not improve with stretching and fluids, come with redness or warmth, or are accompanied by muscle weakness (MedlinePlus).

Get help urgently if a cramp lasts longer than 10 minutes and does not ease when you move, or if cramps develop after contact with a toxin such as lead or mercury. If your GP is closed, phone 111 (NHS inform).

In an emergency call 911 (US), 999 (UK) or 112 (EU).

Frequently asked questions

Why do my legs cramp only at night?

Several factors converge at night. Sleeping with your toes pointed downwards keeps calf muscles shortened, which can trigger cramps — keeping toes up or feet hanging over the bed end may help. Lying still reduces blood flow, and tendons shorten with age, making older adults more prone. But the Mayo Clinic notes there is usually no single identifiable cause; tired muscles and nerve activity during sleep are the most likely explanation.

Are night leg cramps a sign of low magnesium?

Not necessarily. Low levels of electrolytes including magnesium, potassium and calcium can make muscles more prone to spasm, according to MedlinePlus, but most night leg cramps have no measurable mineral deficiency behind them — the Mayo Clinic says there is usually no known cause at all. Do not assume you need supplements; talk to a doctor or pharmacist if cramps are frequent so the real cause can be checked.

What is the fastest way to stop a leg cramp at night?

Stretch the cramped muscle straight away: straighten your leg and gently pull your toes towards you, or stand and put your weight on the affected leg. The NHS says stretching and massaging the muscle may ease the pain, and the Mayo Clinic also suggests massaging with ice or warming the muscle in a hot shower. Most cramps ease within minutes; afterwards the muscle may feel sore for up to 24 hours.

Is it leg cramps or restless legs syndrome?

A leg cramp causes sudden, intense pain in a visibly tightened muscle — usually the calf — and the episode lasts under 10 minutes, with stretching helping to ease it. Restless legs syndrome is different: its main symptom is an uncontrollable urge to move the legs when falling asleep, muscle pain is less common, and symptoms last longer. If you are unsure, track your symptoms and discuss them with your GP.

When should I worry about leg cramps at night?

Occasional cramps are usually harmless, but see a GP if cramps are frequent, regularly disturb your sleep, last longer than 10 minutes, or come with numbness, swelling, redness, warmth or muscle weakness. The NHS says a GP will examine you and look for the reason, which might include medicines, circulation, nerves or other conditions. Get urgent help if a cramp does not ease when you move.

Can drinking more water stop night leg cramps?

It may help but is not a guaranteed fix. The Mayo Clinic advises drinking plenty of fluids while limiting alcohol and caffeine, and the Sleep Foundation notes that staying hydrated may reduce cramp frequency. However, some research suggests nocturnal cramps are not directly caused by dehydration, so water alone may not stop them — regular stretching is the better-evidenced measure.

Sources

  1. NHS: Leg cramps www.nhs.uk
  2. NHS inform: Leg cramps www.nhsinform.scot
  3. Cleveland Clinic: Leg Cramps at Night: Causes, Pain Relief & Prevention my.clevelandclinic.org
  4. Mayo Clinic: Night leg cramps www.mayoclinic.org
  5. Sleep Foundation: Leg Cramps at Night: Tips to Reduce Discomfort www.sleepfoundation.org
  6. MedlinePlus (US National Library of Medicine): Muscle Spasms - Charley Horse medlineplus.gov

About the author

Health Daily Advice

Health Daily Advice: Read Latest Updates on Health News, Diet and Fitness Tips, Mental Health, Disease, Exercise, Medication, Yoga, Workout, Medicine, global health, Workout Moves, Mental and Physical Fitness, Obamacare, health insurance, Medicare, opioids, cancer, heart, medicine, healthy recipes, Covid, Vaccine and advice on losing weight and feeling great from HealthDailyAdvice.com

Our editorial policy

Try the tool

Not sure if it can wait?

Common causes and warning signs for 16 everyday symptoms.

Open the symptom guide

The weekly letter

One useful health read, every week.

No spam, no miracle cures. Unsubscribe in one click.