Nocturnal leg cramps affect up to 60 percent of adults and are more common among women and older adults. Sometimes referred to as muscle spasms or charley horses, they occur when one or more of the muscles in the leg tighten involuntarily. Usually, the muscle relaxes in less than 10 minutes. The leg may feel sore or tender the next day.
Most of the time, there is no apparent cause for nighttime leg cramps. Leg cramps might be related to muscle fatigue or nerve problems. Though leg cramps at night can be extremely painful, they typically aren’t serious. Here are a few tips to try to relieve a cramp:
• Stretch it out
• Walk it off if possible
• Massage the affected area
• Drink fluids with some electrolytes
• Apply heat to the affected muscle
• Avoid alcohol or caffeine before bedtime
Can muscle cramps be prevented?
• Stretch the leg muscles before bed
• Drink plenty of liquids
Most muscle cramps are harmless, and go away after a few minutes. Richard Allen, MD and colleagues published an article in the American Family Physician suggesting that a physical examination rarely demonstrates leg cramps because they are involuntary, unpredictable, and usually nocturnal. If frequent cramps are disrupting sleep, becoming severe, lasting longer, or accompanied by swelling, redness, or feeling of warmth, contact a primary care provider.
 RICHARD E. ALLEN, MD, and KARL A. KIRBY, MD, St. Mark’s Family Medicine Residency, Salt Lake City, Utah. Am Fam Physician. 2012 Aug 15;86(4):350-355.