Leg cramps at night, or nocturnal leg cramps (NLCs), are common and can occur due to inactivity during the day, tired muscles, or certain medical conditions.

A person's leg on a bed in the dark.Share on Pinterest
Maria Maglionico/EyeEm/Getty Images

NLCs, also called charley horses, are uncontrolled spasms in the muscles of the leg that may be painful. The spasms typically occur in the calf muscles, though they may also appear in the thighs or feet.

Much of the time, simple stretches may help ease the cramped muscles. There are also other treatments and prevention methods. Anyone dealing with leg cramps regularly should contact a doctor for a full diagnosis.

Experiencing leg cramps at night is fairly common. In a 2017 study, researchers found that about 30% of adults report having NLCs at least five times a month.

Leg cramps are involuntary muscle spasms anywhere in the leg, though they are most common in the calf. The muscle tenses up, causing discomfort or moderate to severe pain and tightness in the area.

NLCs may also lead to other issues. It can disrupt sleep and break a person’s sleep cycle, which can make them feel tired or lethargic the next day. Leg cramps may make it very difficult to fall asleep, and this could lead to issues such as insomnia over time.

People may confuse NLCs with restless leg syndrome.

The following sections discuss possible causes of leg cramps at night and risk factors that make a person more likely to experience them.

Tired muscles

Research suggests that muscle fatigue may be a primary cause. Athletes are more likely to get leg cramps after doing higher-than-usual levels of activity.

Overexertion, such as exercising the muscles very intensely for a long time, may cause some people to experience more cramping later in the day.

Inactivity during the day

Another leading theory is that sitting for an extended period, such as while working at a desk, may cause the muscles to shorten over time.

This physical inactivity when a person has not stretched their muscles for a while may increase the risk of cramps. The cramps can commonly occur in bed at night.

Someone who does not stretch their muscles or exercise regularly may be more at risk of leg cramps at night. The muscles in people who are less physically active may be shorter, which may increase the risk of cramping or spasms.

Body position

Sitting or lying in a certain way that restricts movement or blood flow to the legs, such as resting one leg on the other or sitting with the legs crossed, may lead to cramps.

People may wish to experiment with sleeping in more stretched-out positions to see if this eases their nighttime leg cramps.

Older age

As people age, they may also be more likely to have leg cramps at night. Research suggests that at least 37% of people over the age of 60 get NLCs.

Standing for long periods during the day, which is common in many jobs, may fatigue muscles. The muscles tire during the day and may be more likely to cramp later on during the night.

Pregnancy

There may also be a link between pregnancy and leg cramps at night. This might be due to the increased nutritional demands or hormone changes in the body during pregnancy.

A side effect of medication

Many medications list muscle cramping as a side effect. Few of these are directly associated with leg cramps, but there are some, including:

Medical conditions

Some chronic medical conditions may also put a person at risk for chronic leg cramps, such as:

Anyone who thinks one of these conditions may be the cause of their leg cramps should talk with a doctor for further information or guidance.

Treating leg cramps at night, in the moment they occur, may help a person get more rest.

Some possible home remedies to find relief in the moment include:

  • gently stretching out the muscle
  • massaging the area by hand
  • using a foam roller to massage the leg
  • flexing and unflexing the foot to help extend the leg muscles
  • applying heat to the area

Taking nonsteroidal anti-inflammatory drugs (NSAIDs), such as ibuprofen or aspirin, will not help ease cramps because cramps are not related to inflammation. They may help deal with the pain from a cramp but will not relieve the cramps.

In some cases, doctors will prescribe medications to treat chronic leg cramps, though the evidence on the effectiveness of these medications is limited. These include:

  • carisoprodol (Soma)
  • gabapentin (Horizant, Gralise, and Neurontin)
  • diltiazem (Cardizem)
  • verapamil (Verelan and Calan)
  • orphenadrine (Norflex and Norgesic)

A person should talk with a doctor to discuss these drugs and any possible side effects.

On March 21, 2022, Sandoz issued a voluntary recall of 13 lots of the drug orphenadrine citrate 100-milligram (mg) extended-release (ER) tablets due to the presence of nitrosamine.

Nitrosamine, a known carcinogen with the potential to cause cancer, was found to exist in the drug at levels greater than the acceptable daily intake, as determined by the Food and Drug Administration (FDA).

This recall is specific only to a handful of lot numbers and does not affect all orphenadrine tablets made by Sandoz.

If a person takes orphenadrine citrate 100-mg ER tablets, they should talk with a pharmacist or doctor, who can help to determine if their medication has been impacted by the recall.

Preventing leg cramps in the long term may be the best option for some people, though this is not always possible.

Doing mild exercise

Some people feel they do not experience as many cramps if they do some mild exercises at the end of the day. This may include activities such as walking or spending a few minutes on a stationary bike before bedtime.

Drinking plenty of water

Fluids help transport nutrients and waste to and from the muscles. Drinking fluids, especially water, throughout the day can help prevent cramps by keeping the muscles functioning well.

Changing shoes

Some people may notice they have less cramping when they wear more supportive shoes. Anyone uncertain about how supportive their footwear is can consult a podiatrist.

Experiencing occasional leg cramps at night is normal and usually not a cause for concern. Simple home remedies may help in the moment, such as flexing the foot, stretching the legs, or massaging the tense muscle.

Anyone experiencing regular leg cramps at night for prolonged periods should contact a doctor for a full diagnosis. They may prescribe medication or other treatments to manage NLCs and help a person sleep better.

The following are frequently asked questions about NLCs and their answers.

When should a person contact a doctor for NLCs?

If a person experiences them frequently, if they get in the way of daily life, and if home methods do not help, they should speak with a doctor about possible causes and treatments.

Likewise, if the cramps spread to other muscles or become severe, people can contact a doctor for a full diagnosis.

What deficiency causes leg cramps at night?

Some sources say that mineral deficiencies cause NLCs. However, there is limited evidence that supplementing with minerals such as magnesium, vitamin B6, or vitamin E can reduce or relieve these muscle cramps.