Cramps, leg

Page last reviewed: 13/07/2011

Leg cramps are a common, annoying but usually harmless condition that cause sudden muscle pain in the leg. Leg cramps usually occur in the calf muscles below the knee, although they can affect any part of the leg.

In three out of four cases, leg cramps occur at night during sleep.

What are cramps?

A leg cramp occurs when your muscles suddenly shorten (contract), causing pain in your leg. This is called a spasm. You cannot control the affected muscle when it happens.

The cramp can last from a few seconds to 10 minutes. When the spasm passes, you will be able to control the affected muscle again.

Types of leg cramps

There are two main types of leg cramps:

  • idiopathic leg cramps occur for no apparent reason (idiopathic is a Greek word that roughly translates as 'suffering for no reason')
  • secondary leg cramps are a symptom or complication of a known health condition

Causes of secondary leg cramps include:

  • pregnancy
  • side effects of certain medications
  • liver disease

How common are leg cramps?

It is difficult to estimate exactly how commonly leg cramps occur because most people do not report their symptoms to their GP.

From what evidence is available, it seems that two groups of people are particularly affected by leg cramps:

  • older adults over 60 years old - it is thought that one third of people over 60 experience leg cramps, with 40% of these people having three or more cramps a week
  • pregnant women - it is estimated that a third of pregnant women have leg cramps, usually during the last trimester of pregnancy (from week 27 to the birth)

However, people of all ages, including children, have reported idiopathic leg cramps.

There does not appear to be any difference in the rates of men or women affected by leg cramps.


In most cases, cramping can be relieved by exercising the affected muscles. Regularly exercising during the day often helps to reduce the frequency of cramping episodes.

Medication is usually only required for the most persistent cases of cramping that do not respond to exercise.

For more information on exercise and medication.

The outlook for secondary leg cramps will depend on the underlying cause. For example, leg cramps that occur during pregnancy should pass once the baby is born.

Leg cramps that occur during a serious case of liver disease can be harder to treat. They may require a more aggressive treatment approach, with medications such as muscle relaxants.

Page last reviewed: 13/07/2011

A leg cramp is an episode of sudden and severe pain that occurs in the leg muscles due to an involuntary contracting (shortening) of the muscle in the leg.

Most cramps occur in the calf muscles and, less commonly, in the feet and thighs. Cramps can last from a few seconds up to 10 minutes. Cramps that occur in the thigh muscles tend to last the longest.

During an episode of cramping, the affected muscles will become tight and painful, while the feet and toes become stiff.

Once the cramps have passed, you may feel tenderness and pain in your legs for several hours.

Timing of cramps

Research has found that:

  • 3 out of 4 people only have leg cramps at night
  • 1 out of 5 people have leg cramps during the day and night
  • 1 out of 14 people experience leg cramps only during the day

When to seek medical advice

Occasional leg cramps are not a cause for concern and do not require a medical diagnosis.

In most cases, you will only need to visit your GP if your cramps are so frequent or painful that they disrupt your sleep and you are having problems functioning normally the next day.

Also visit your GP if you notice that the muscles in your legs are shrinking or becoming weaker.

When to seek immediate medical advice

There are two signs that leg cramps may be symptoms of a more serious underlying health condition:

  • the cramps last longer than 10 minutes and fail to improve, despite exercise
  • cramps develop after you come into contact with a substance that could be toxic (poisonous) or infectious - for example, getting a cut that is contaminated with soil (which can sometimes cause a bacterial infection, such as tetanus) or being exposed to elements such as mercury or lead

In these circumstances, telephone your GP for advice immediately.

Page last reviewed: 13/07/2011

Idiopathic leg cramps

As the name suggests, the cause (or causes) of idiopathic leg cramps are unknown, although a number of theories have been suggested. These include:

  • abnormal nerve activity that may occur when a person is sleeping, which causes the muscle of the leg to cramp
  • excessive strain placed on leg muscles, such as when exercising, may cause the muscles to cramp at certain times
  • a sudden restriction in blood supply to the affected muscles

Another theory about why older people are particularly affected by leg cramps is that tendons naturally shorten over time as we grow older. Tendons are tough bands of tissue that connect muscles to bone. If the tendons become too short, they may cause the muscles that are connected to them to cramp.

Secondary leg cramps

Causes of secondary leg cramps include:

  • pregnancy - it is thought that the extra weight that women have to carry during pregnancy can strain the leg muscles, making them more vulnerable to cramping
  • exercise - many people experience leg cramps when resting after exercise
  • neurological conditions (conditions that affect the nerves that control your leg muscles) - for example, motor neurone disease (a condition where the nerves in the brain and the spine gradually lose function) or peripheral neuropathy (a condition where the nerves inside the leg are damaged)
  • liver disease - once your liver stops working properly, toxins inside the blood can build up, which can make your muscles go into spasm
  • infection - some type of bacterial infection, such as tetanus, can cause muscle cramps and spasm
  • toxins - high levels of toxic (poisonous) substances in the blood, such as lead or mercury, can cause leg cramps in some people
  • dehydration - a low level of water in your body leads to a similar drop in your salt levels, which can trigger muscle cramps in some people


A number of medications have been known to cause leg cramps in a small number of people. These include:

  • diuretics - these remove fluid from the body and are used to treat a number of conditions, such as high blood pressure, heart failure and some types of kidney disease
  • statins - these are used to treat people with high cholesterol levels in their blood 
  • raloxifene - this is used to prevent osteoporosis (thinning of the bones) in women who have gone through the menopause
  • nifedipine - this is used to treat angina and Raynaud's phenomenon (when the supply of blood to the fingers is restricted)
  • nicotinic acid - used in the treatment of high cholesterol

If you are concerned that your medication is causing your leg cramps, contact your GP as your dosage may need to be adjusted. Never stop taking a prescribed medication unless advised by your GP or another qualified healthcare professional who is responsible for your care. 

Page last reviewed: 13/07/2011

You should visit your GP if your leg cramps are affecting your quality of life. For example, see your GP if you have frequent leg cramps, or they are affecting your sleep.

Making a diagnosis

When you visit your GP with leg cramps, they will ask you about your symptoms and examine your legs and feet. Your GP may ask you:

  • about the pain in your calf, thigh or foot, and how severe it is
  • whether the pain comes on suddenly
  • how long the pain lasts
  • whether your leg cramps are affecting your sleep, mood and quality of life

Your GP may also ask if you have any other symptoms, such as numbness or swelling. Additional symptoms such as these may be a sign that you have secondary leg cramps caused by an underlying condition

Under these circumstances, your GP may arrange further tests, such as blood and urine tests, so that possible causes (e.g. liver disease) can be ruled out.

Page last reviewed: 13/07/2011

Your treatment plan

If your leg cramps have an underlying cause (secondary leg cramps) then treating the underlying cause may help to relieve your symptoms in many cases.

For example, secondary leg cramps related to liver disease are caused by high levels of toxins in the blood triggering muscles spasms. So muscle relaxants can be used to help prevent muscles from going into spasms.

If there is no known underlying cause (primary idiopathic leg cramps) then a combination of exercise and painkilling medication is usually recommended.


Most cases of leg cramps can be treated with exercises.

There are two types of exercise that you can do:

  • an exercise that you carry out during an episode of cramping to relieve the pain and end the cramping
  • exercises that you carry out during the day to reduce how often you get leg cramps

Exercises during cramps

If you get a leg cramp, try stretching and massaging the affected muscle. For example, if the cramp is in your calf muscle:

  • straighten your leg and lift your foot upwards, bending it at the ankle so that your toes are lifted towards your shin (the front of your lower leg)
  • try walking around on your heels for a few minutes

Exercises to prevent cramps

To reduce your chance of having leg cramps in the future, do exercises to stretch the affected muscles three times a day.

For example, if your calf muscles are affected by cramps, then the following exercise should be beneficial:

  • stand one meter (3.3ft) away from a wall
  • lean forward with your arms outstretched to touch the wall while keeping the soles of your feet flat on the floor
  • hold this position for five seconds, then release
  • repeat the exercise for five minutes

It is recommended that you do the above exercise three times a day, including one session just before you go to bed.

If you find these exercises useful then carry on doing them for as long as you are able to.


If you have lingering leg pain after an episode of cramps, an over-the-counter painkiller such as paracetamol or ibuprofen should reduce any pain.


Quinine is a medication that was originally designed to treat malaria. Research has since found that it can be moderately effective in reducing the frequency of leg cramps.

However, there is a small chance that quinine may cause unpleasant side effects, such as:

  • tinnitus (ringing in your ears)
  • impaired hearing
  • headache
  • nausea (feeling sick)
  • disturbed vision
  • confusion
  • hot flushes

A more serious and rare complication of quinine is thrombocytopenia, when your level of platelets (a type of blood cell) drops to a dangerously low level. Platelets help the blood to clot, so people with  thrombocytopenia are prone to excessive bleeding, such as:

  • nose bleeds
  • bleeding gums
  • bleeding inside the eye
  • bleeding inside the skull or digestive system - both of which can be fatal

There have been a number of reported cases of people dying from thrombocytopenia after taking quinine to prevent leg cramps.

Never take more than your recommended dose of quinine. An overdose of quinine can result in permanent blindness and death.

Because of these potential risks, however small, your GP will only prescribe quinine if there is evidence that the potential benefit of treatment outweighs the risks.

It is recommended that quinine is only prescribed when:

  • you have tried the exercise techniques discussed above and they have not helped to prevent leg cramps
  • the leg cramps are frequent and affecting your quality of life

If this is the case, you will be prescribed a four-week course of quinine. If you gain no benefit, the treatment will be withdrawn.

If you have any of the side effects listed above, stop taking quinine immediately and contact your GP.

Your treatment will be monitored closely and reviewed regularly. For example:

  • you may be asked to keep a 'sleep and cramp' diary to check how often you are getting leg cramps
  • your GP is likely to review your initial treatment after three months
  • if your condition improves, your GP may reassess your treatment needs every three to six months 

Page last reviewed: 13/07/2011

If you get leg cramps frequently, stretching exercises may help to prevent them or reduce how often you get them.

Supporting your toes

Supporting your toes while you're asleep may also help you to prevent getting cramp in your legs. The following advice may be helpful to you:

  • if you're lying on your back, prop your feet up with a pillow
  • if you're lying on your front, hang your feet over the end of the bed - this will keep your feet in a relaxed position and help to stop the muscles in your calves from contracting and tensing
  • keep your blankets and bedding loose

Content provided by NHS Choices and adapted for Ireland by the Health A-Z.

Browse Health A-Z