Requests

Laboratory tests

Night cramps: relief and prevention

Waking in the middle of the night with a hard, painful calf and being unable to straighten your foot is an experience many people know.

Clínica Alegre practitioner examining a blood sample tube beside sample collection tubes

Reviewed by Dr Fernando Alegre

Clinical Director · OMD, registration no. 9688

Written by the Clínica Alegre team9-minute read

In this article

Night cramps (nocturnal leg cramps) are very common, particularly from the age of 50 and during pregnancy, and may recur several times a week. Beyond the pain, their greatest impact is usually on sleep: fear of another cramp and the residual pain make it difficult to fall asleep again, and tiredness builds up.

This article focuses on what you can do: how to relieve a cramp when it happens, which measures have some scientific support for prevention, what to expect from supplements and medicines, and when to see a doctor. It also explains when laboratory tests can help. They have a useful role in some cases but are unnecessary in most. Results should always be interpreted by the doctor who ordered the tests.

What to do during a cramp

The most effective way to stop a calf cramp is to stretch the affected muscle. Sit on the bed with your leg straight and pull your toes towards your knee, either with your hand or a towel. Alternatively, stand up and put your weight on the affected leg, with your heel firmly on the floor, or take a few steps. The cramp will generally ease within seconds to a few minutes.

After the cramp, gently massaging the muscle and applying heat, such as a warm shower, may relieve the residual pain. Some people prefer cold. No studies clearly show which is better, so use whichever is more comfortable. If the pain lasts for many hours or there is swelling, seek an assessment.

Location of crampHow to stretch
Calf musclesPull your toes upwards with your leg straight; or stand with your heel on the floor
Sole of the footPull your toes upwards; walk a few steps barefoot
Back of the thighStraighten the leg and lean your upper body forwards
Front of the thighWhile standing, bend your knee and bring your heel towards your buttock

Stretching before bed

Stretching the calf muscles before bed is the most widely recommended preventive measure. For one simple exercise, stand facing a wall with your hands against it, one leg bent in front and the other straight behind you with the heel on the floor. Lean forwards until you feel the calf of the back leg stretching. Hold for about 30 seconds and repeat a few times with each leg.

According to a review from 2012, people may try stretches and massage for cramps at night. Its authors caution that there is little research: participant numbers were low and the findings were not always consistent. Nevertheless, these measures are free and safe for most people, so it is reasonable to try them for a few weeks and judge the effect.

ExerciseHow to do itSuggested frequency
Wall stretchBack leg straight, heel on the floor, lean forwards3 times for about 30 seconds, each leg
Seated towel stretchLeg straight, pull the toes with the towel3 times for about 30 seconds
StepToes on a step, lower the heelsA few slow repetitions

Position in bed and sleep habits

During sleep, many people lie with their toes pointed, which keeps the calf muscles shortened. Sheets and blankets tucked tightly over the toes reinforce this position. Loosening the bedclothes at the bottom of the bed or placing a pillow so that the ankles remain in a more neutral position are common suggestions, although they have not been well studied.

People who sleep on their stomach can let their feet hang over the end of the mattress to avoid pointing the toes. Keeping regular sleep times and avoiding sitting for many hours before bed, particularly with your legs crossed, may also help. These measures are sensible and safe, but the evidence supporting them is based mainly on clinical experience.

Physical activity and footwear

Regular physical activity suited to each person's age and condition helps maintain muscle strength and flexibility. Walking, cycling and strengthening exercises are common options. The key is to increase the intensity gradually, because sudden or unfamiliar exertion can instead trigger cramps.

Footwear matters too: supportive shoes without very high heels, suited to the activity, reduce strain on the leg and foot muscles. People with flat feet or other foot problems may benefit from an assessment by a specialist.

Supplements: what the studies say

Magnesium is the most sought-after supplement. An updated 2020 Cochrane systematic review concluded that magnesium probably offers no clinically meaningful benefit for older adults with ordinary cramps. In pregnancy, study results are conflicting. There are insufficient suitable studies for other situations. The most common side effects are digestive problems, and magnesium can build up in people with kidney disease.

Other supplements, including B vitamins, vitamin E and calcium, have produced limited or inconsistent findings in research. If you are still considering a supplement, speak to your doctor or pharmacist first, particularly if you have kidney disease, are pregnant or take other medicines. As a general guide, follow the dose recommended by the healthcare professional.

OptionOverall evidenceExamination
MagnesiumProbably no meaningful benefit in older people; inconclusive in pregnancyDiarrhoea; caution with kidney disease
B vitaminsSmall studiesOnly on medical advice
Vitamin ENo clear benefitNot recommended for this purpose
CalciumWeak evidence in pregnancyRisks from excessive intake

Medicines: why quinine is no longer used

For decades, quinine was the medicine most commonly used for night cramps. A 2015 Cochrane review concluded that it reduces the frequency and severity of cramps, based on low- to moderate-quality evidence, but causes more minor side effects than placebo and that excessive doses can have serious consequences, including death. It is therefore no longer recommended as a routine treatment.

Other medicines have been studied with limited results. Any medicine for cramps should be used only on prescription, after weighing the benefits against the risks. It is also worth reviewing current medication: some diuretics, long-acting inhaled bronchodilators and, to a lesser extent, statins are associated with cramps. Never stop taking a prescribed medicine without speaking to your doctor.

When tests can help

The 2012 review indicates that, for typical night cramps, the medical history and physical examination are usually enough and routine electrolyte tests are unnecessary. Tests become useful when the history suggests a cause: use of diuretics, kidney or liver disease, diabetes, thyroid symptoms, prolonged vomiting or diarrhoea, excessive alcohol consumption, or severe cramps of recent onset.

In these cases, the doctor may request sodium, potassium, calcium, magnesium, glucose, creatinine, TSH or CK tests. Reference ranges vary between laboratories and should be read on the report. When preparing to have the sample taken, follow the laboratory's instructions about fasting, timing and medicines. If you are told that your potassium is very abnormal, contact your doctor that day.

SituationTests the doctor may consider
Use of diureticsSodium, potassium, magnesium, creatinine
Diabetes or suspected diabetesGlucose, HbA1c
Thyroid symptomsTSH
Statin use with muscle painCK
Kidney or liver diseaseCreatinine, electrolyte panel, liver function tests

Pregnancy: particular precautions

Night cramps are very common in pregnancy, particularly in the last few months. Gentle stretching, suitable physical activity and adjusting the position of the feet in bed are measures that most pregnant women can try safely. Supplements, including magnesium and calcium, should be discussed with the doctor providing their care, as the evidence is conflicting.

A swollen, hot, red and painful leg during pregnancy should be assessed that day because of the increased risk of venous thrombosis. A severe headache, changes in vision or sudden swelling of the hands and face also require urgent medical advice.

When to see the doctor

See your GP if the cramps are very frequent, persistently disturb your sleep, begin after a new medicine, or are accompanied by weakness, loss of muscle mass, tingling or numbness. Bring a list of your medicines and, if possible, a diary showing the frequency and timing of your cramps.

Some situations require assessment that day or urgent assessment: a swollen, hot and painful leg; severe muscle pain with weakness and dark urine; cramps with palpitations, shortness of breath or fainting. In these cases, call 112 or SNS 24 (808 24 24 24) for advice.

SignWhat to do
Frequent cramps with no other symptomsRoutine appointment with your GP
Cramps after starting a new medicineSpeak to the prescribing doctor without stopping the medicine
Weakness or loss of muscle massPrompt appointment
Swollen, hot and painful legSame-day assessment
Palpitations, shortness of breath, faintingCall 112

At Clínica Alegre in Setúbal and Seixal, you can have laboratory tests and ask our team any questions about the results.

Frequently asked questions

What is the quickest way to stop a cramp?

Stretch the muscle: with your leg straight, pull your toes upwards, or stand with your heel on the floor.

Does tonic water help?

It contains small amounts of quinine, far below the doses studied, and there is no robust evidence of benefit.

Should I take magnesium every night?

The evidence shows little or no benefit for ordinary cramps in older adults. Speak to your doctor before starting it.

Does stretching really work?

The studies are small and results vary, but it is a safe measure worth trying for a few weeks.

Do I need tests?

Not always. Your doctor will decide based on your medical history, medicines and examination.

Does eating a banana at night prevent cramps?

There is no evidence of benefit for people with normal potassium levels.

Do night cramps go away on their own?

They may vary over time; in pregnancy they usually disappear after the birth.

Did you enjoy this article?

Scientific references3
  1. Allen RE, Kirby KA. Nocturnal leg cramps. Am Fam Physician. 2012;86(4):350–5.
  2. Garrison SR, Korownyk CS, Kolber MR, et al. Magnesium for skeletal muscle cramps. Cochrane Database Syst Rev. 2020; 9(9):CD009402.
  3. El-Tawil S, Al Musa T, Valli H, et al. Quinine treatment for muscle cramps. Cochrane Database Syst Rev. 2015;(4):CD005044.
Article information
Written by
Clínica Alegre team
Clinical review
Dr Fernando Alegre, Clinical Director · OMD, registration no. 9688
Published
2 Dec 2026
Last updated
2 Dec 2026
Topic
Laboratory tests
Reading time
9 min

See also

Related treatments

Want to know what is right for you?

Contact us on WhatsApp or book an assessment, in person or online.

Book an appointment

Book your assessment.

Choose Setúbal or Seixal. We reply within opening hours.

Newsletter

Get the latest news from the Clínica Alegre.

Blog articles and clinic news, delivered to your inbox. Unsubscribe at any time.