Leg pain that shows up at night — or gets worse when you lie down — is common, and the reason it happens often points to the cause. The fix depends entirely on what is driving it. Muscle cramps, nerve compression, poor circulation, and restless legs syndrome are the most frequent culprits, and each responds to different strategies. What actually works is matching the response to the cause, not applying a single remedy to every kind of leg pain.
Why Does Leg Pain Get Worse At Night?
Several things change in your body when you lie down, and those changes can unmask or worsen leg pain that barely registers during the day.
Gravity stops helping your circulation. When you are upright and moving, your calf muscles act as a pump that pushes blood back toward the heart. Lying still removes that pumping action. If you have venous insufficiency — where veins struggle to return blood efficiently — fluid and pressure can build in the lower legs. This often produces a heavy, achy, or throbbing feeling that becomes noticeable at rest.
Nerve compression can also change with position. The spine shifts when you lie down, and a disc or bone spur that was not pressing on a nerve while you stood may press on it when you are flat. This is one reason sciatic-type pain sometimes flares at night. Certain sleeping positions — especially lying on your stomach with the spine extended — can narrow the openings where nerves exit the spine.
There is also a simple attention effect. During the day, movement, noise, and activity compete for your brain’s attention. At night, the room is quiet and your body is still. Pain signals that were background noise become the main signal. This does not mean the pain is not real or that it is “in your head.” It means the nervous system is finally getting a clear signal.
What Causes Leg Cramps At Night?
Nocturnal leg cramps are sudden, involuntary contractions of the calf or foot muscles. They are extremely common, especially after age 50, and they can wake you from sleep with intense pain.
The exact mechanism is not fully settled, but several factors are consistently associated with them. Muscle fatigue, dehydration, and electrolyte imbalances — particularly low magnesium or potassium — are commonly cited. Some medications are linked to cramps, including diuretics and statins. Pregnancy is a well-known trigger. So is simply having a sedentary routine or standing on hard surfaces for long periods.
What the evidence shows about treatment is more limited than most people assume. Quinine, once widely prescribed for cramps, is no longer recommended because of serious side effects including blood disorders, and regulatory agencies have advised against its routine use for this purpose. Stretching the calf before bed has some supporting evidence and is low-risk. Magnesium supplementation is popular, but trials have produced mixed results — some show benefit, others do not. The evidence is genuinely mixed.
If cramps are frequent and severe, it is worth a medical evaluation rather than assuming they are harmless. In some cases they signal an underlying issue such as nerve compression, kidney problems, or thyroid disease.
How Do You Tell If Leg Pain Is Nerve-Related?
Nerve pain has a distinct character. It tends to be burning, shooting, tingling, or electric rather than dull and achy. It may travel down the leg in a line rather than staying in one spot. Numbness, pins-and-needles, or a feeling that the leg is “asleep” point toward a nerve cause.
Peripheral neuropathy — nerve damage most often from diabetes — commonly causes burning or tingling in the feet and lower legs that worsens at night. This is a well-established pattern. The reason for the nighttime worsening is not fully understood, but reduced distraction and changes in blood flow and temperature at rest are thought to play roles.
Sciatica, caused by compression of the sciatic nerve or its roots in the lower spine, typically causes pain that radiates from the lower back or buttock down the back of the leg. It can be worse when lying down, especially in certain positions. Sleeping on your side with a pillow between your knees often reduces the pull on the lower spine, though this is a comfort measure rather than a proven treatment.
Restless legs syndrome is a separate condition. It produces an overwhelming urge to move the legs, usually accompanied by uncomfortable sensations, and it is characteristically worse in the evening and at rest. It is a recognized clinical diagnosis with established diagnostic criteria, and it is more common in people with iron deficiency. If this sounds like your experience, it is worth discussing with a clinician, because it has specific treatments that differ from those for cramps or neuropathy.
When Is Leg Pain At Night A Circulation Problem?
Circulation problems come in two main forms that affect the legs, and they behave differently.
Venous insufficiency is a problem with blood returning to the heart. It causes heaviness, swelling, aching, and sometimes itching or restless sensations. Symptoms typically worsen after prolonged standing and may improve with elevation. Lying down with the legs slightly elevated can help reduce the pooling that builds through the day.
Peripheral artery disease (PAD) is a problem with blood getting to the legs. It classically causes cramping pain in the calf, thigh, or buttock during walking that eases with rest. This is called intermittent claudication. PAD can also cause pain at rest in advanced cases, and that pain often worsens when the legs are elevated — because elevation reduces the already-limited blood flow. This is an important distinction. If your leg pain gets worse when you put your feet up, that pattern is more consistent with an arterial problem than a venous one, and it warrants medical evaluation.
PAD is associated with smoking, diabetes, high blood pressure, and high cholesterol. It is diagnosed with simple, non-invasive tests such as the ankle-brachial index. It is not something to self-treat with stretching or supplements.
What Actually Helps Leg Pain At Night?
The most effective approach depends on the cause, so the first step is figuring out which pattern fits. What follows is grouped by what the evidence supports.
- For cramps: Calf stretching before bed has some supporting evidence and is low-risk. Staying hydrated and correcting known electrolyte deficiencies may help, though the evidence for routine magnesium supplementation is mixed.
- For nerve pain: Position changes that reduce spinal compression, such as side-sleeping with a pillow between the knees, can reduce discomfort. Persistent nerve pain needs medical assessment rather than home remedies.
- For venous pooling: Elevating the legs during the day and using compression stockings — properly fitted — can reduce symptoms. Compression is well-established for venous insufficiency, but it should not be used without evaluation if arterial disease is possible.
- For restless legs: This has specific medical treatments. Iron status should be checked, since correcting deficiency can improve symptoms in some people.
What does not have strong evidence: massage, topical creams marketed for “nerve support,” and most supplements sold for leg discomfort. No large human trials have confirmed benefit for most of these products. Some people find warmth or a gentle massage soothing, and there is no harm in comfort measures — but comfort is not the same as treatment.
When Should You See A Doctor About Nighttime Leg Pain?
Some leg pain at night is harmless and self-limiting. Some is a sign of something that needs attention. The following warrant a medical visit:
- Pain that gets worse when you elevate your legs
- Swelling, redness, or warmth in one leg — this can signal a blood clot, which is a medical emergency
- Numbness, weakness, or loss of bladder or bowel control alongside back or leg pain
- Pain that is severe, progressive, or waking you most nights
- Signs of infection such as fever or a wound that is not healing
- New leg pain in someone with diabetes, or who smokes, or who has known heart disease
A blood clot in the leg — deep vein thrombosis — is the most urgent possibility. It typically causes swelling, pain, warmth, and sometimes redness in one leg, often the calf. It can occur after surgery, long travel, or prolonged immobility. If you have these signs, seek care promptly rather than waiting to see if it improves.
Most nighttime leg pain has a manageable explanation. The key is identifying which one applies to you, because the response differs. Cramps, nerve pain, circulation problems, and restless legs are not treated the same way, and treating the wrong one wastes time.
Frequently Asked Questions
What is the fastest way to stop a leg cramp at night?
Stand up and gently stretch the affected calf by pressing the heel toward the floor while leaning forward, or pull the toes toward you while sitting. This often relieves the contraction within seconds to a minute.
Does magnesium help with nighttime leg cramps?
The evidence is mixed. Some trials show benefit and others do not, so it is not a reliably proven treatment. It may be worth discussing with a clinician, especially if deficiency is suspected.
Why does my leg pain get worse when I lie down?
It depends on the cause. Nerve compression can change with position, venous blood can pool when you are still, and reduced daytime distraction makes pain more noticeable. Pain that worsens specifically when the legs are elevated points toward an arterial circulation problem.
Is nighttime leg pain a sign of something serious?
Often it is not, but certain signs are serious. Swelling, warmth, or redness in one leg can indicate a blood clot, and pain that worsens with elevation can indicate peripheral artery disease. Both warrant prompt medical evaluation.

