Leg Cramps at Night: Causes and Remedies

Jul 20, 2017
Sleeping Legs


Rate this Post: 

Average: 3.5 (126 votes)

Eeow! Startled from a deep sleep, you suddenly come to with a shriek, as your calf, thigh, or maybe the arch of your foot contracts in violent pain. Leg cramps can be a common and painful occurrence—here’s what causes leg cramps at night, as well as how you can prevent and relieve them.

Emerging groggily from the edge of sleep or from a deep sleep, you struggle to straighten your leg, pull your toes forward, perhaps kneading the knotted muscles with your thumbs. After the spasms subside, you may get up and try to hobble around a bit to loosen up the painful area a little more.

By now you’re completely awake, and you may not return to sleep. The cramped muscles may remain tender for hours or even days.*

The nighttime “Charley horse” is an age-old, global problem. Other languages use terms that translate into phrases like muscle hangover, wooden leg, thigh hen, thigh cookie, donkey bite, old woman, and water buffalo.

What causes leg cramps at night?

Sixty percent of adults say they’ve experienced nocturnal leg or foot cramps at some time in their lives.

Pregnant women and older people tend to suffer nighttime leg cramps more often than other groups, but medical experts say there’s often no clear explanation of why these nighttime leg cramps occur, listing many conditions that might bring one on, including:

  • Hard exercise during the day
  • Electrolyte imbalance 
  • Dehydration
  • Neurological, neuromuscular, or endocrine disorders
  • Lumbar stenosis
  • Standing for long periods on concrete floors
  • Sitting all day in a cramped position
  • A side effect of some drugs

How to prevent leg cramps

If you’re you’re prone to leg cramps at night, these 6 tips may help:

  • Stay flexible with a regular stretching program. (Look for information on stretching a specific muscle group by clicking the Exercise Search box at the top right of the page, then click on the body part in the diagram.)
  • A lot of uphill walking/running or stair-climbing shortens the back muscles and the muscles and tendons at the back of the legs, making them more likely to cramp later. Focus attention on stretching these muscle groups after a hilly workout.
  • Go for a deep-tissue therapeutic massage with an experienced practitioner. Ask her/him to teach you the techniques for the muscle groups in the legs and feet, so you can work the knots out before they become disabling cramps.
  • Loosen the bedcovers so they don’t press your feet down and shorten the muscles of your arches, encouraging them to cramp.
  • Drink when you feel thirsty, especially after exercise. Don’t overdo it. Tea, coffee, smoothies, fruits, and vegetables all contribute to your daily fluid needs.
  • Eat a variety of potassium- and magnesium-rich foods every day. Good choices: Black beans, kidney beans, nuts and seeds, potatoes, sweet potatoes, leafy greens (especially beet greens), bananas, and other fruits.

The drug quinine, once prescribed to prevent night cramps, is now rarely prescribed for this use, because the possibility of severe adverse reactions outweighs the benefits of its use.

If you start having far more frequent or severe attacks of night cramps, see your doctor for an evaluation to rule out a more serious medical condition.

Leg Cramp Remedies

When a cramp startles you from sleep, here are 5 tips to manage the problem:

  • Take a few breaths, and try to stay calm. Panicking may cause you to tighten the affected muscles even further and prolong or intensify the cramp.
  • If the cramp is in your arch or calf muscles, forcefully extend your toes toward your head and hold the stretch until the cramp subsides. This will release the tension so the muscles can relax. You may need to sit up, bend over, and pull your toes forward with your hands.
  • If the cramp is in the back of your thigh, roll out of bed, bend at the waist, supporting yourself on your forearms, and keep bending forward until you feel the cramped muscles stretching out. Hold the stretch until the cramp abates.
  • I’ve had good luck using a towel or a woven stretching strap to help straighten out especially vicious hamstring cramps.
  • When the acute pain subsides, get up and walk around a bit to bring oxygen to the camped muscles. A cold pack or hot pack may help. I like the long, rectangular “beanbags” (cloth sheaths filled with beans or other seeds) heated for a couple of minutes in the microwave and wrapped around sore muscles. (Great for arthritic joints, too.)

Don’t confuse nighttime leg cramps with restless legs syndrome (RLS). RLS is annoying and may cause an aching sensation, but it’s not usually painful, and doesn’t cause cramping.

*Note: If your calf or thigh is swollen, warm to the touch, or discolored; if your pain gets worse when you get up and walk around, and doesn’t subside after a minute or two, seek immediate medical help. Don’t knead or massage a swollen muscle.

These symptoms could signal a serious, potentially life-threatening condition called a deep vein thrombosis (DVT), a blood clot in a deep vein that can travel to a lung, where it can block blood flow.

About This Blog

"Living Naturally" is all about living a naturally healthy lifestyle. Margaret Boyles covers health tips, ways to avoid illness, natural remedies, food that's good for body and soul, recipes for homemade beauty products, and ideas to make your home a healthy, safe haven. Our goal is also to encourage self-sufficiency, whether it's re-learning some age-old skills or getting informed on modern improvements that help us live better healthier lives.

Reader Comments

Leave a Comment

Nighttime Leg Cramps

My first nighttime leg cramps were 25 years ago. They've gotten more severe and more frequent as I get older. But now I know what causes them:


Sulfites are present in many foods, but for me, red wine was the worst, followed by white wine, followed by meats marinated in wine. Cut ALL of those out of your diet, drink sufficient water to avoid dehydration, and I suspect your leg cramps will disappear immediately.

Night cramps

I have suffered for over 20 years with night cramps and found that vitamin K tablets were excellent but recently these have been only available on prescription and are costly. For the last 6 months I have resorted to drinking about 3 litres of water a day and this has totally cured my night cramps. I haven’t changed my diet or exercise regime at all. Just water. So relieved for this simple solution (pun intended).

Restless Leg/Night Leg Cramps

I have both problems, and have tried most all the home remedies, and doctors advice most work for a bit, but none work all the time. I have been trying the exercise within 30 min prior to going to bed and that seems to work most of the time for the cramps. Sometimes I can tell by tingles and asleep feelings I will have restless legs at night, and I take a couple of buffered aspirins just before going to bed, and most times it works. I know aspirin is not good for all.

Leg spasms

I use a massager, it starts on top of my foot or on the side of my calls, it's awfully make me want to take my own life, it's that bad!! I've tried the pickle juice and the mustard, tonic water, nothing works, don't know what to do I just can't take it anymore


Any pain this bad calls for a visit with your doctor, Janis. Before you go, jot down a list of when, where, and how often the cramps occur, and the various remedies you’ve tried to prevent or soothe them. I’d also suggest making a note of the kind of mattress you sleep on, and your favored sleeping position.

Bring the notes to your doctor’s office so he/she will get all the specific details about your situation.

A cure

I tried every possible remedy to be found on the web without success. I woke up shrieking every night.

Then I realized I never got cramps while sleeping away from home. I removed a 3" thick foam mattress pad from my bed. Since then I've slept on a firm mattress. Not one cramp in three weeks so far.

No Single Solution for Everyone

A lot of great ideas here, you just need to find the one that works for you. There are numerous studies published on this and even the experts cannot point to a single cause. The posts below that refer to the balance between Magnesium, Calcium, and/or Potassium are in line with the study results. Of course, unless you know what your deficiency is, taking the wrong supplement could make it worse.

For example, there is research supporting the benefit of Magnesium supplements*, but ONLY in individuals with a magenesium deficiency. (* Magnesium Citrate, not Magnesium Oxide which is not easily absored)

If the cramps appear after a day of heavy exercise and/or sweating, the salt water is likely to help, especially as a preventative measure. Pickle juice is loaded with salt so the results should be similar in these individuals, as would Gatorade or the equivalent.

It is obvious from the posts that the placebo affect is also a factor here. This is understandable because anything that causes to to relax and not worry about it as much will help.

Anyone who has had these knows that there is that moment just before it happens where you can feel it coming and your brain is like "Nooo!", followed by some degree of panic. I have had some success with actually being able to stop it in it's track at this point by taking a huge deep breath, grabbing the mucle and squeezing quite hard, while continuing to breath as slowly as possible and telling myself I can control this. This works best when you are not completely asleep when it starts.

The above is also most effective if you take the time in advance to learn where the trigger point(s) are that relate to the muscle in spasm. Usually it is the trigger point in the upper lateral part of the gastrocnemius (main calf) muscle. In my case, managing this trigger point in advance has been the bast way to prevent the spasms in the first place. I have come to be able to sense when an episode is coming, about 6-12 hours in advance, and if I ignore the signs I am in trouble that night.

Learn how to release the trigger point using a tennis ball or your hands. Also check for trigger points in the tibialis anterior and extensor digitorum longus (muscles on the front of your shin between the two bones). Your calf muscles work against these muscles and if they are constantly fired up, your calf muscles may be just be "hanging on for dear life" to keep your foot aligned. To find/release anterior (front) shin trigger points, the tennis ball may be too large to go between the bones. A lacross ball or even golf ball may work better, but watch out with the latter, if you have issues there it may be quite alarming.

Good advice here on ensuring your sheets blankets are not tight around your feet. You do not want anything holding the calf muscles in a shortened position. This applies all day as well. In your normal sitting position, are your feet pointed down, up, or neutral? The best is actually none of the above for any long period. Switch it up, move around, and change your position. One poistion you should always avoid is with your legs extended on a footrest and your feet hanging off the end of the footrest. Make sure your heels are supported.

In some cases, a night splint may be helpful (either posterior or anterior). You can get these devices at walmart or any drug store. They are intended for use at night when sleeping and hold your foot at an angle (toes pointing up toward your head) such that calf muscles are in a stretched position. Seems like a good idea, UNLESS your anterior (front/shin) muscles are tight and inderectly causing the problem (as above).

SLEEP. Getting enough sleep is essential to muscle rebuilding and repairing. Not just any sleep, but deep sleep (REM/dreaming cycle). This is when your voluntary muscles go limp, so to speak, allowing blood to circulate and provide the needed nutrients to repair the muscle fibers. The amount of deep sleep required is directly related to amount of exercise/stress on the muscle during the day. You need more every night during a week when you are hiking or playing sports every day than a week where you are mostly resting (however not moving around causes other issues, as above). Professional athletes in intense traning often average 10 hours of sleep a night, or otherwise become injury prone. I know someone who suffered frequency night leg cramps throughout college and early medical career, a time in which he was not sleeping much and under significant stress. Upon taking a much less stressful position (teaching), and increasing hours of sleep, he has not suffered a single leg cramp.

Be wary of posts that imply a single solution is right for everyone. The person posting is not "wrong" or posting in bad faith. Their solution did work for them and they are trying to help. There is no harm in trying any of these remedies (within reason and common sense) but it should not be claimed that just because something worked for one person, that everyone should do that and ignore all the other advice and solutions.

leg cramps

Other solutions which can help leg cramps are:
Make a tea from onion shells.
Put full, left over or bits of soap under mattress cover near feet where the bumps will not bother you

Leg Cramps & Soap

I saw this on the internet and thought it was crazy, but my leg cramps were getting more and more severe, sometimes twisting around my leg, so what the heck, let's give it a try.

It worked

So of course then I wondered if it was all in my head, but I was okay with that. Then my husband removed the soap one day while making the bed. I wasn't aware of it and my leg cramps came back. Also, if the soap gets old it becomes less effective. If we cut it in half it works again.

Don't know what the tie-in is, but it works for this girl.

Magnesium supplements

I have started taking magnesium supplements between 30-100% of DV. Night time cramps are gone.

Tonic water for leg cramps

My friend swore by drinking a glass of tonic water every day for stopping leg cramps. I thought she was nuts but I tried it anyway. And by golly...it works!

Leg ctamps

I get these now and them in the arch of my foot, calf and once deep in my thigh. I found the best remedy was to drink a lot of water and walk it off. Usually takes about 10 minutes but always works for me.

Leg & foot cramps

This may sound very silly, but it seems to work 85-90% of the time. Put a bar of scented soap (remove its packaging) between your sheets, by your feet. It makes your sheets smell nice and it works. If a cramp arises, pull the soap near the cramp. My friends and family have been amazed at the results, too.

Leg and foot cramps

Magnesium oil spray every couple of days prevents this problem altogether.

Leg cramps

I use Magnesium Oil topically. It stops leg cramps very quickly.

Salt for Leg Cramps

Why is no one mentioning salt? I only get leg cramps when i sweat a lot during the day. When i wake up with a cramp i dissolve 1/4 teaspoon of table salt or sea salt in hot tap water and drink it. The cramps stop in a couple of minutes after this treatment.
It is obvious to me that sweat removes salt from the body and this must be replaced.

Magnesium Deficiency Causes Leg Cramps

Magnesium and calcium work together and must have a balanced ratio in the body. Calcium causes contractions while magnesium relaxes. We have way too high an intake of calcium and cannot really get magnesium in foods since it's depleted in soils. Take Magnesium L-Threonate or Magnesium Citrate daily anywhere from 300-700 mgs depending on the severity of your cramps. I love the quality of Dr Mercola's products. Also look up Dr Carolyn Dean who's got some amazing information on magnesium. Mind blowing and life changing.

Drink some dill pickle juice

Drink some dill pickle juice

Leg Cramp Relief

My wife gets leg cramps quite frequently. She works at Wal-mart and is on her feet all day. I found some stuff at my local pharmacy that says "STOPS LEG AND FOOT CRAMPS In about one minute". It also says "Proven Old Amish Formula." You can either drink it (about one cap full in 2 oz. of water). But it tastes like crap to her because it has a lot of Apple Cider Vinegar in it. But I've drank it before and it is strong tasting, but I could deal with it. I even have a half Gal. in the fridge and take a sip about once a day. But I have asthma and the scent almost takes my breath away, but I just inhale and take a quick small swallow. She'll get a cramp and get up and rub it on her leg and in about 1 to 1 1/2 minutes it eases up. It says you can drink it or rub it directly where the cramp is and it actually does work. I've even done it on my feet. After a minute the cramp is gone. Haven't had a cramp since I'd been taken my SIPS almost everyday. Or at least every other day. It's about $11.00 for 8 oz.s and we don't use it often or she doesn't, but it does work and last a good while since you don't need to very much..

"Proven Old Amish Formula"..Caleb Treeze Organic Farm

You are so right! I found this product at our local Apothecary (Drug Store). It is wonderful and I never go without a supply on hand even when we travel. There is also another formula available for Acid Reflux. Not every pharmacy carries this product, but you can order it on line or call 818-247-9600 to have it sent to you. They can also tell you where you may be able to find it as the list of locations for purchase is growing as word spreads. I use an old cloth and apply it directly to the area of the cramping. It does have a strong odor, but when you are in that much pain and you know you will get relief within a couple of minutes the odor is less offensive. The price varies at different locations from $8.50 at Amish Retail Stores to $12.00 in some pharmacies. Honestly, it's a small price to pay for agonizing muscle cramp relief within two minutes.

leg cramps

I have suffered since a young child with leg cramps! Now I have the answer! For lower calf pinch under nose/above lip hold and breathe deep! Your muscle will release right away! Any other muscle cramp use absorbine Jr. Horse liniment. Its 4 % menthol. I buy it at Tractor Supply in the horse department. Its a gel not messy to use. I even use it on my old dogs for back pain! I rub my hands down when I have done a lot of hard work also knees! I give it as gifts at christmas. My neighbor uses it on his back now! Its a wonder cure all!!!I keep a bottle beside my bed for night time use!

leg cramps

I have suffered since a young child with leg cramps! Now I have the answer! For lower calf pinch under nose/above lip hold and breathe deep! Your muscle will release right away! Any other muscle cramp use absorbine Jr. Horse liniment. Its 4 % menthol. I buy it at Tractor Supply in the horse department. Its a gel not messy to use. I even use it on my old dogs for back pain! I rub my hands down when I have done a lot of hard work also knees! I give it as gifts at christmas. My neighbor uses it on his back now! Its a wonder cure all!!!I keep a bottle beside my bed for night time use!

leg cramps

Be very careful using potassium supplements! An excess of OR, not enough potassium can cause dangerous heart rhythms!

leg cramps

While Restless Leg Syndrome is not a serious condition, just annoying, it can suggest a much more concerning condition...Anemia! If it persists please check with your Doctor!

leg cramps

I use magnesium oil...whenever I get a cramp..I use magnesium oil...this stuff really

Leg cramps

Bar of soap under the sheets! When cramp starts just put the cramped area on the soap and it subsides on less than a minute! Yeah I know you don't believe it but it works for me.

More on Potassium

Two things:

First, @ the poster "Judi" who said she used sea salt to increase potassium.

Sea salt doesn't have higher amounts of potassium than other salts. That said, there are blends out there where potassium is added.

If she was using a blend, it might well have been helpful. If not, sounds like a more basic electrolyte imbalance.

Second though, Judi is absolutely correct to note that sometimes the deficiency is potassium. I had a problem several years back with severe gurgling and moderately painful heart palpitations and magnesium didn't help. I was going to head into the hospital to get it checked, but before I did that, I tried, just to see, if potassium helped. Heart palps went away within a week of beginning half-dose supplements.

leg cramps

Be careful with Magnesium...Doc reccommeded Mag supplements and it made my mild leg cramps unbearably painful. Yikes! My research led me to info that I need to balance magnesium, potassium & calcium. I do not eat processed foods & so I was not getting much potassium (salt). But I was taking calcium supplements and eating foods with lots of magnesium. I increased the sea salt (potassium) in my homemade cooking, estabished a balance for these three minerals and leg cramps went away immediately.

Leg cramps

Have had off/on over the yrs; the worst one I had was when about 8 mos pregnant with first child. It was softball size/feel and I had a bruise in the calf for the next 2d. Best way for me to alleviate them is to stand barefoot on something cold but not frozen, until the cramp is gone-no idea why it works but I am still grateful to the lady who shared it with me after telling her about the above mentioned event. It has worked every time and I have shared the remedy with many others.


I suffered from terrible leg and foot cramps, and found some relief from the pickle juice and yellow mustard remedies. But the very best relief came from slipping a bar of regular bath soap under my bottom sheet and leaving it there. It sounds silly, but it's from The People's Pharmacy and they don't know why it works, either. Now I don't have to get out of bed and run to the fridge with painful cramps. Sometimes I rub the leg or foot on the bar of soap for immediate relief.

Nighttime leg cramps

Jessie - the soap under the bottom sheet works for me, too!

Soap works

A bar of soap at the end of bed works wonders.

Leg Cramps

Being a teacher and on my feet all day, I suffered leg cramps constantly. It was by accident that while in the hospital for a kidney problem and resultant muscle cramps, I came to a conclusion with the doctor that a magnesium supplement would possibly help. I immediately started taking a 400 mg. tablet each day (over the counter and cheap!) along with potassium supplements I take for my kidneys. It immediately helped and the leg cramps went away for good. I've had only 1 or 2 episodes in 14 years, and this was when I stopped taking the supplement. (It immediately subsided when I went back). I now take the magnesium only once or twice a week (we eat very healthily). I also have learned to do stretches throughout the day and fall sleep with feet curled upward at night. Don't just start popping pills. Discuss it with a doctor or nutritionist first, but maybe this may work for you also.

Leg cramps

Many folks like myself take statin drugs which tend to deplete the CoQ-10 in the body causes legs cramps. a 100mg solfgel daily stops them for me. I have never had such pain as legs cramps in the night and since I started taking CQ 10 I have not had any more pain. Plus CQ 10 is beneficial for heart health.

What is statin drugs?

What is statin drugs?


Such a diversity of home remedies—from magnesium-containing products to pickle juice to simply getting out of bed and standing up. The large number of useful remedies probably stems in part from the fact that leg cramps can have many causes.

Thanks for your responses, everyone.

Leg Cramps

I have found that insufficient magnesium can also cause leg/foot cramps. I take the liquid magnesium citrate which is found w/ the laxatives. Too much can taken can be a laxative. I take 1 tsp. a.m. and p.m. Your intestinal tract will also thank you. Start out slow w/ perhaps 1/2 tsp. The liquid is far less expensive and enters the system more quickly.
Hope this is helpful to someone.

After you have tried everything and they don't work for you....

Try Cramp-Z, something my cousin recommended as I was having very painful leg cramps on a regular basis and had tried all the other methods and they didn't work for me. I was skeptical, but I tried it and it works in just about a minute. It's a spray and I ordered it online.

Nighttime Leg Cramps

A nurse told me that I should try eating a spoonful of mustard. I do this all the time now when my legs cramp, works in less than a minute! By the way, I use French's mustard but a friend told me drinking pickle juice would work too.

I get out of bed and stand up

I get out of bed and stand up when I get Charlie horses in my calves. Instant relief every time! I'm so glad I figured that out. Hard to want to do that when in a sound sleep, but totally worth it!

Leg cramps

I use essential oils. Young Living's, Panaway is the best! I keep a bottle by my bed and as soon as I feel one coming on, I drop a few drops on that muscle and rub it in. It works every time!

Salt works like pickle juice

I'm a diabetic and I seem to get cramps when my sugar's too high and I pee a lot. A little bit of sea salt under my tongue - followed by a drink of water once it dissolves - usually solves the problem.

Cramp and diiabetic

I used to suffer the most horrible under rib cramps until I learned about pickle juice. Will also try the salt under the tongue.. I am on extreme low carb and feel my potassium may be low so I added 1/2 a banana a day and have not had the cramps since to speak of.
Blessings of healing to you.

I keep Icy Hot by my bed.

I keep Icy Hot by my bed. Warm water also works. I get them from hip to foot!

Pickle Juice!

Save the brine from dill pickles and take a shot glass of that at night before bed. It sounds ridiculous, but works miracles. The calcium carbonate and electrolytes in the brine will stop cramps in their tracks (and in your tracks too). Oh and please, whoever wrote this, change the heading from "HOW TO RELIEVE LAMP CRAMPS" to leg cramps. My lamps don't get cramps. :)

leg cramps from meds

A certain medication left me in the bush with full spasm from hip to toes one side then other, and if I tried to move it revived even worse. It was a nightmare. if one did not have anxiety or depression before taking the med would after. I actually thought I would die. fortunatly my friend was a physio therapist and raised my one leg and rotated across body very carefully did same with other. after it subsided 2 peolple had to help me walk. I began to wean myself that very day off meds.

Leg cramps

I have watched my husband have horrible leg cramps. A shot of dill pickle juice works every time for him. I have seen his muscle pulled tight and loose while he is drinking it.

I suffer from massive cramps

I suffer from massive cramps as above mentioned. What works for me is drinking Tonic Water with quinine.Drinking a glass before bed or during the day really helps.I also do stretching exercises when they are really bad.

night time leg cramps

My foot doctor recommends 4 ounces of tonic water before bed time, regular or diet.

I often get a a big toe cramp

My big toe sticks up straight and there is no way to push it back so I have found, as difficult as it may seem, I get up and walk and it a couple of step is all it needs,

Moist turkey, crispy skin.

Holiday Dinner Plans
Prize winning Pilgrim Turkey recipe.


You will also be subscribed to our Almanac Companion Newsletter


Solar Energy Production Today

0.00 kWh

Live data from the solar array at The Old Farmer's Almanac offices in Dublin, NH.