Home › Stress & Sleep › What causes night cramps, and how can you stop them?

Stress & Sleep

What causes night cramps, and how can you stop them?

Written by Natural World TeamReviewed and approved by the Natural World editorial teamPublished 9 October 2026
A woman who was awakened by a painful calf cramp during the night

What to know

  • Night cramps are sudden, involuntary muscle contractions that usually affect the calf, foot or thigh. They are very common and generally harmless, though they can be intensely painful.
  • Most night cramps have no clear cause. Known risk factors include ageing, pregnancy, dehydration, certain medications (such as statins and diuretics) and prolonged sitting or standing.
  • To relieve a cramp, stretch and massage the affected muscle, then stand and put weight on the leg. The NHS recommends regular calf stretches as the main way to reduce how often cramps happen.
  • See your GP if cramps are disrupting your sleep, lasting longer than 10 minutes, or if you also have numbness or swelling in your legs.

If you have ever been woken by a sudden, sharp pain in your calf that leaves the muscle rock-hard and impossible to relax, you have experienced a night cramp. They are one of the most common muscle complaints, affecting up to 60% of adults at some point according to the Cleveland Clinic. Most are harmless and pass within minutes, but when they keep coming back, they can seriously disrupt your sleep and leave you dreading bedtime. Here is what causes them, what to do when one strikes and how to make them less frequent.

What night cramps feel like

A night cramp is a sudden, involuntary tightening of a muscle that happens during sleep or while you are resting. The calf is the most common site, but cramps can also affect the foot, the thigh or, less often, the hamstring. During the cramp, the muscle feels hard and knotted, and the pain can be intense enough to wake you from deep sleep.

Most cramps last from a few seconds to about 10 minutes. Even after the muscle relaxes, it can feel sore and tender for several hours or up to a day afterwards. According to the NHS, most people get leg cramps at night or while resting, and they usually pass without any treatment.

Night cramps are sometimes confused with restless legs syndrome (RLS), but the two are different. RLS causes an uncomfortable urge to move the legs, often described as crawling, tingling or itching, and is usually relieved by movement. It is not normally painful in the way a cramp is. A night cramp, by contrast, is a sharp, forceful contraction that locks the muscle in place.

Why night cramps happen

In many cases, there is no clear cause. The NHS lists ageing, exercise strain, pregnancy and certain medications as common factors, but notes that some cramps simply happen without explanation.

Known risk factors and triggers include:

One common belief is that night cramps are caused by a lack of minerals such as magnesium or potassium. While severe deficiencies can cause muscle problems, the evidence that mineral supplements prevent cramps in people who are otherwise healthy is weak. The Samitivej Hospital medical team describes the mineral-deficiency theory as a common misconception in many cases.

What to do when a cramp strikes

The priority during a cramp is to release the contraction. The NHS recommends:

After the cramp has passed, the muscle may still feel sore. The NHS suggests that paracetamol or ibuprofen can help with the lingering soreness, but notes that painkillers do not work during the cramp itself because they take too long to act. Applying a warm flannel or a hot water bottle to the area can also help relax the muscle.

Keep supplies within reach

If night cramps are a regular problem, keep a few things by the bed: a glass of water, a small towel you can loop around your foot to pull it into a stretch, and a hot water bottle or heat pad. Being able to act quickly can shorten the cramp and help you get back to sleep.

How to reduce night cramps

There is no guaranteed way to prevent night cramps entirely, but several measures can make them less frequent.

Stretch regularly

The NHS recommends a daily calf-stretching routine as the main way to reduce cramps. The technique is simple: stand facing a wall with your arms outstretched and your hands flat against it. Keeping your feet flat on the floor, lean forward until you feel a stretch in your calves. Hold for two to three seconds, then stand upright. Repeat for about five minutes, three times a day, with the last session just before bed. Once cramps become less frequent, you can reduce this to once or twice a day.

Stay hydrated

Drinking enough water throughout the day helps maintain normal muscle function. The NHS and the Cleveland Clinic both recommend staying well hydrated and limiting alcohol and caffeine, which can contribute to dehydration.

Keep active

Gentle activity such as walking or riding a stationary bike for a few minutes before bed can help prepare the muscles for rest. Banner Health recommends light exercise after dinner as a way to reduce cramp frequency.

Keep bedding loose

Tight sheets and heavy blankets can press the feet downward during sleep, shortening the calf muscles and making cramps more likely. Keeping the bedding loose at the foot of the bed allows your feet to move freely.

Check your footwear

Shoes that lack proper arch support can put extra strain on the muscles and tendons in the lower leg. If you spend long periods standing, supportive footwear may help reduce the strain that contributes to cramps.


How to reduce night cramps

Natural and traditional remedies

Several natural approaches are commonly suggested for night cramps, though the evidence for most is limited.

None of these is a substitute for the core approach recommended by the NHS: regular stretching, staying hydrated and staying active.

When to see your GP

Most night cramps are a nuisance rather than a sign of something serious. However, the NHS advises seeing your GP if:

When to get urgent help

Seek urgent medical attention if a cramp lasts longer than 10 minutes and does not respond to stretching, if you develop muscle weakness or wasting alongside the cramps, or if cramps start after you have been exposed to a toxic substance (such as pesticides, heavy metals or industrial chemicals). The Mayo Clinic also advises seeking prompt care if cramps are accompanied by significant leg swelling, skin changes or severe pain that does not ease.

Your GP can review your medications, check for underlying conditions and, if needed, prescribe treatment. In the UK, quinine tablets are the main prescription option for persistent night cramps. The NHS notes that quinine is not suitable for everyone, and your GP will discuss the risks and benefits with you before prescribing it.

Common questions

Why do I get cramps in my calves at night?

The calf is the most common site for night cramps, partly because the calf muscle is under constant use during the day and can become fatigued, and partly because sleeping positions can keep the muscle in a shortened state. Pointing the feet downward in bed, which happens naturally for many people, shortens the calf and makes it more prone to cramping. Keeping the bedding loose and doing calf stretches before bed may help.

Are night cramps a sign of something serious?

In most cases, no. Night cramps are extremely common, especially as you get older, and are usually harmless. However, if they are very frequent, unusually severe or accompanied by other symptoms such as numbness, swelling, muscle weakness or skin changes, it is worth seeing your GP to rule out underlying conditions such as peripheral artery disease, kidney disease or peripheral neuropathy.

Does magnesium help with leg cramps?

The evidence is mixed. A Cochrane review found that magnesium supplements are unlikely to provide meaningful benefit for most adults with leg cramps, though there may be a small benefit during pregnancy. If you think you may be deficient in magnesium, speak to your GP rather than self-supplementing, as they can check your levels and advise you.

Can dehydration cause night cramps?

Dehydration is listed as a possible risk factor for leg cramps by both the NHS and the Mayo Clinic. When the body is low on fluids, the balance of electrolytes that muscles need to contract and relax properly can be disrupted. Staying well hydrated throughout the day, particularly in warm weather or after exercise, may help reduce the risk.

What is the best sleeping position to prevent leg cramps?

There is no single best position, but avoiding positions that point the toes downward can help. If you sleep on your back, try propping the toes up with a pillow or keeping the bedding loose so the feet are not pushed flat. Some people find that sleeping on their side with a pillow between the knees helps keep the muscles relaxed.

Natural World Team

Independent guides to natural remedies and supplements, checked against NHS and EFSA references.

Medical disclaimer. This article is for information only and does not replace advice from your GP, midwife or pharmacist. Check with a professional before taking a supplement, especially if you are pregnant, breastfeeding, taking medication or have a health condition.