Requests

Vitamins, minerals and hormones · Laboratory Tests

Leg cramps: causes and tests.

Leg cramps are common and almost always harmless, particularly at night. Often, no cause is found, but some medicines, pregnancy and certain conditions can play a part. Find out what the doctor assesses and when tests may be useful.

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

In summary

The essentials, in a few lines.

  • A cramp is a sudden, painful muscle contraction, almost always in the calf, that lasts from a few seconds to around 10 minutes.
  • The cause often remains unknown; age, physical exertion, pregnancy, dehydration and medicines such as statins and diuretics are among the most frequently cited factors.
  • When the doctor suspects low magnesium, calcium or potassium, or kidney or thyroid disease, they order targeted tests; for isolated cramps, routine tests rarely explain the cause.
  • At Clínica Alegre in Setúbal, samples are collected on Mondays and Tuesdays by appointment, then sent to the Joaquim Chaves Saúde laboratory.

Causes

Why do the leg cramps.

Up to 60% of adults report night cramps, and they become more frequent with age. No cause is found in most people, but it is worth knowing which situations the doctor looks for.

  • Cramps with no identified cause

    What you may feel

    They occur at night or at rest, particularly in the calf, and wake you up. After the cramp, the muscle may remain sore for up to 24 hours.

    What helps

    The doctor confirms that these are cramps rather than another similar problem. Stretching the calf before bed is the most widely recommended measure, although evidence of benefit is limited.

  • Physical exertion and dehydration

    What you may feel

    They occur during or after exercise, more often in hot or humid weather, or when you have not drunk enough. Overuse or a muscle injury is the most common cause of muscle cramps.

    What helps

    Stopping, stretching and massaging the muscle, and drinking fluids, is usually enough. If cramps recur in someone who trains intensively, the doctor may order electrolyte, magnesium and calcium tests.

  • Medicines

    What you may feel

    Statins (for cholesterol) and diuretics (for high blood pressure) are among the medicines associated with cramps, as are others, including some hormone treatments and intravenous iron.

    What can happen

    Diuretics and some antibiotics can lower potassium or magnesium levels in the blood, and low levels can cause muscle weakness and an irregular heartbeat.

    What the doctor assesses

    Never stop taking a medicine on your own. The doctor reviews your medication, orders electrolyte or magnesium tests if necessary, and decides whether there is an alternative.

  • Low magnesium

    What you may feel

    In addition to cramps, it may cause tiredness, weakness, reduced appetite, nausea and tingling. It is more likely after excessive drinking, prolonged diarrhoea, poorly controlled diabetes or with some medicines.

    What can happen

    Very low levels can cause an irregular heartbeat and, in extreme cases, seizures. Low magnesium can also lower calcium.

    What happens next

    The doctor orders a blood magnesium test and treats the cause. Take supplements only on medical advice: studies show little or no benefit from magnesium for night cramps with no identified cause.

  • Low calcium or potassium

    What you may feel

    Low calcium can cause cramps and tingling in the lips, fingers and feet. Low potassium can cause cramps, weakness, constipation and palpitations; it can occur with diuretics, vomiting, diarrhoea or laxatives.

    What can happen

    Severely abnormal potassium or calcium levels can affect heart rhythm and require treatment overseen by a doctor.

    What the doctor assesses

    The doctor orders calcium and electrolyte tests (sodium, potassium and chloride). If calcium is low, they investigate the cause: vitamin D or magnesium deficiency, kidney disease or parathyroid disease.

  • Pregnancy

    What you may feel

    Leg cramps are common during pregnancy, particularly in the later stages.

    What helps

    Speak to the doctor or nurse looking after you during pregnancy before taking any supplement: studies of magnesium during pregnancy have not shown a clear reduction in cramps.

  • Kidney, liver and thyroid conditions

    What you may feel

    Kidney failure, dialysis treatment, drink-related liver disease and reduced thyroid function (hypothyroidism) are among the conditions associated with cramps.

    What can happen

    These conditions often develop without clear symptoms, and cramps may be one of the first signs that prompt someone to see a doctor.

    What the doctor assesses

    Where your medical history suggests a need, the doctor checks kidney function, including creatinine, and thyroid function, including TSH.

  • Problems that can be mistaken for cramps

    What you may feel

    Calf pain that appears while walking and stops at rest (claudication), an urge to move the legs without a visible contraction (restless legs), or tingling and burning in the feet (neuropathy) are different problems.

    What the doctor assesses

    The doctor distinguishes between them through discussion and examination. Claudication points to a circulation problem; neuropathy may lead them to order glucose and vitamin B12 tests.

Do you need to have these tests?Book your sample collection at the Setúbal clinic, on Mondays and Tuesdays.

The result

What tests may show.

For isolated cramps with no other symptoms, routine tests rarely find the cause. The doctor orders them when the discussion and examination point to a specific problem.

  1. Targeted testing

    Depending on what they suspect, the doctor may order magnesium, calcium and electrolyte tests (sodium, potassium and chloride) and, where appropriate, creatinine for the kidneys and TSH for the thyroid.

  2. Blood collection

    Blood is taken from a vein in the arm, in a procedure that usually takes less than five minutes. While your blood is being taken, avoid repeatedly clenching and unclenching your fist: this can briefly raise potassium and distort the result.

  3. Reference values

    Each test comes with the testing laboratory's reference range for adults. Ranges may vary between laboratories; the report shows those used by that laboratory. A normal blood magnesium level does not always reflect the body's stores.

  4. Discussion with the doctor

    A result outside the range does not always need treatment: diet, fluids, vomiting, diarrhoea and medicines affect these levels. The doctor considers the results alongside the symptoms and decides whether to repeat the test, treat the problem or look for another cause.

Normal results are also helpful: they rule out several causes and allow the focus to remain on stretching, reviewing medicines and monitoring.

Preparation

How how to prepare for the tests.

Magnesium, calcium and electrolyte tests require little preparation. These steps help prevent misleading results.

  • Fast only if requested

    No special preparation is needed for these tests alone. If other tests that require an empty stomach are being done that day, including a blood sugar test, follow the instructions from the person who ordered them.

  • Medication and supplements

    Take your medication as usual unless your doctor advises otherwise. Tell them everything you take: diuretics, laxatives, antacids, and magnesium, calcium or vitamin D supplements can affect the results.

  • Drink water as normal

    Arrive well hydrated for your blood test. Dehydration, vomiting or diarrhoea in the preceding days may affect electrolyte results; tell your doctor if you have experienced these.

  • Keep a record of the cramps

    Note when they occur, how long they last, which muscle is affected and what you were doing. This record helps the doctor more than any single test.

Warning signs

When speak to the doctor.

Most cramps are harmless. Speak to your GP, or to the doctor who ordered the tests, if:

  • The cramps often disturb your sleep or do not improve with stretching
  • They last more than 10 minutes or keep returning
  • You also have numbness or swelling in your legs
  • They started after you started taking a new medicine, such as a statin or diuretic
  • They are accompanied by severe muscle weakness, palpitations or an irregular heartbeat
  • The pain in your leg occurs when walking and goes away when you stop

If you are unsure, SNS 24 offers advice on 808 24 24 24. If you have chest pain or severe difficulty breathing, call 112.

Do you have questions about your tests?Contact us using the form or WhatsApp.
A Clínica Alegre professional preparing to take blood from a patient's arm

At Clínica Alegre

What the sample collection at the clinic.

Clínica Alegre is a sample collection point in Setúbal. It collects the samples for the tests requested by your doctor and sends them to the Joaquim Chaves Saúde laboratory (JCS).

  1. 1

    Advance booking

    Blood samples are taken by appointment only, booked using the form, by telephone or via WhatsApp. Tell us which tests you have been asked to have, such as magnesium, calcium or electrolytes, so that we can discuss preparation. Bring the doctor's request form if you have one.

  2. 2

    Sample collection in Setúbal on Monday or Tuesday

    Blood is taken from a vein in the arm with a fine needle in a procedure lasting a few minutes. Keep your hand relaxed while the blood is being taken.

  3. 3

    Testing at the JCS laboratory and results discussed with your doctor

    The JCS laboratory analyses the sample, validates the results and sets the delivery time. The clinic does not interpret results: discuss them with the doctor who requested the tests.

Monitor your health

Prevention and follow-up care.

Not all cramps can be prevented, but these habits can help make them less frequent.

  • Stretch every dayStretch your calves for around 5 minutes, three times a day, with the final session before bed.
  • During a crampStretch and massage the muscle; standing with your weight on the affected leg may help.
  • Drink enoughDrink more fluids in hot weather, during exercise, or if you have vomiting or diarrhoea; excessive alcohol makes cramps worse.
  • Review your medicationBring a list of everything you take to the appointment, including supplements and non-prescription medicines.
  • No self-medicationOnly take magnesium or potassium supplements and quinine on medical advice; quinine is no longer recommended.

Frequently asked questions

Questions frequently asked.

Frequently asked questions

Do I need to fast for tests for cramps?

Magnesium, calcium and electrolyte tests alone need no special preparation. If other tests that require an empty stomach are being done that day, including a blood sugar test, follow those instructions. Always check with the person who ordered them.

Are night cramps caused by a lack of magnesium?

Not always, and not in most people. Night cramps often have no identified cause, and studies show little or no benefit from magnesium supplements in these cases. Low magnesium is more likely with alcohol, prolonged diarrhoea, poorly controlled diabetes or some medicines.

What does it mean if my magnesium, calcium or potassium is low?

It may mean losses through the bowel or kidneys, the effect of medicines, low intake or another condition. A result outside the range does not always need treatment: the doctor assesses it alongside your symptoms and decides whether to repeat the test or investigate the cause.

Does sample collection hurt and how long does it take?

You will feel a brief needle prick in a vein in your arm, and the sample collection usually takes less than five minutes. You may have mild soreness or a small bruise, which will soon fade. The laboratory will advise when your results will be ready.

Which medicines can cause cramps or affect the test results?

Statins and diuretics are among the medicines associated with cramps. Diuretics, some antibiotics and proton pump inhibitors can lower magnesium, while laxatives or antacids containing magnesium can raise it. Tell your doctor everything you take and never stop a medicine on your own.

I have cramps during pregnancy: should I have tests?

Cramps are common during pregnancy, particularly in the later stages. Speak to the doctor or nurse looking after you during pregnancy: they will decide whether any tests are needed. Avoid supplements unless advised; studies of magnesium during pregnancy have not shown a clear reduction in cramps.

Do children get cramps too?

Yes, although less often than adults: one review reports night cramps in around 7% of children. Assessment, and the decision whether to order tests, is the responsibility of the paediatrician or GP.

Do the tests need to be repeated?

It depends on the result. A slightly abnormal level after vomiting, diarrhoea or a change in medication is often retested for confirmation. The doctor will tell you whether and when it should be repeated.

When should I see a doctor about cramps?

When they disturb your sleep, last more than 10 minutes, recur often or occur with numbness or swelling in the legs. You should also see a doctor if they started with a new medicine, or if pain occurs when walking and stops at rest.

Where can I have these tests?

At Clínica Alegre in Setúbal, on Mondays and Tuesdays by prior appointment. The clinic collects the samples and the Joaquim Chaves Saúde laboratory analyses them and validates the results, which you should discuss with your doctor.

Book an appointment

Book your assessment.

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