If painful leg cramps have woken you up in the middle of the night, the condition can be both scary and confusing.

You may think it’s due to the position you’re sleeping in — but there’s more to know about nighttime leg cramps than that. 

In original interviews, two physicians gave a "leg up" on the causes and treatments of nighttime leg cramps.

NEW YEAR, NEW ROUTINE: A GUIDE TO BASIC STRETCHING FOR BETTER OVERALL HEALTH

Here's what to know.

What are nighttime leg cramps? 

More commonly known as a charley horse, a nighttime leg cramp is when the muscles in a leg quickly tighten up.

A charley horse is a sudden, painful and involuntary muscle spasm or cramp, noted health.com. While it usually happens in your leg, especially the calf, it can actually happen in any muscle.

woman wearing long compression socks

"Sometimes the cramps last a few minutes, but I have had patients whose leg cramps lasted longer than that," said one doctor. (iStock)

A person can be woken up as a result of painful leg cramp symptoms, said Mike Sevilla, M.D., a family physician with Family Practice Center of Salem in Salem, Ohio. 

"Sometimes the cramps last a few minutes, but I have had patients whose leg cramps lasted longer than that," he said.

Who gets nighttime leg cramps? 

Nighttime cramps become more common as people get older and unfortunately, can become more frequent, Sara Austin, M.D., an associate professor of neurology at the Dell Medical School at the University of Texas at Austin, told Fox News Digital. 

OZEMPIC AND WYGOVY COULD LEAD TO MUSCLE LOSS, EXPERTS SAY, BUT PREVENTION IS POSSIBLE 

She is also a fellow of the American Academy of Neurology.

If you experience frequent leg cramps, your primary care doctor should test to make sure your thyroid hormone level is normal.

Most of the time, nighttime leg cramps just happen — but there are some causes, she said.

Being human. "That's the most common cause. We all get them sometimes," she said.

Woman sick in bed

"If you notice that the cramps are associated with weakness in the extremity, or if they consistently interfere with the way you walk, you should bring that to your doctor's attention." (iStock)

Hypothyroidism. If you experience frequent cramps, she said, your primary care doctor should test to make sure your thyroid hormone level is normal.

Dehydration or very intense exercise. "Make sure if you sweat excessively or are dehydrated that you drink more fluids, preferably with some electrolytes," she cautioned.

BURNOUT AND OVERTRAINING ARE FORCING YOUNG ATHLETES TO DROP OUT OF SPORTS, NEW REPORT REVEALS

Restless leg syndrome. Those who have restless leg syndrome seem to describe some of their symptoms as cramps, she said. 

"If you consistently feel like you wake up after being asleep for several hours and you feel symptoms in your leg — cramping, tingling, burning, aching — that are relieved by getting up and walking around, you might have restless leg syndrome," Austin said. 

"If you find that you're having two to three cramps every night for weeks to months, you should check in with a neurologist."

Speak with your doctor for further evaluation.

Can leg cramps be a sign of serious conditions?

Some neuromuscular diseases are associated with more frequent muscle cramps, but this is not common, said Dr. Austin. 

"They are very rare," she said.

man sleeping in bed at night

There are also prescription medication options for nighttime leg cramps, "but patients should check with their family physician before considering prescription meds." (iStock)

"But if you find that you are having two to three cramps every night for weeks to months, you should check in with a neurologist," she advised. 

10 HEALTHY HABITS TO PRACTICE EVERY DAY THAT TAKE LESS THAN 10 MINUTES EACH

"Or, if you notice that the cramps are associated with weakness in the extremity, or if they consistently interfere with the way you walk, you should bring that to your doctor's attention."

How can someone treat leg cramps?

When leg cramps begin, start with a gentle stretching of the muscles, said Sevilla of the Family Practice Center of Salem. 

CLICK HERE TO SIGN UP FOR OUR HEALTH NEWSLETTER

"In addition, what may help symptoms include massage of the area and application of a heating pad."

Man sleeping in his bed and snoring loudly

When leg cramps begin, start with a gentle stretching of the muscles.  (iStock)

CLICK HERE TO GET THE FOX NEWS APP

Also, he said, "consider over-the-counter pain medication like acetaminophen or ibuprofen."

There are also prescription medication options, "but patients should check with their family physician before considering prescription meds."

For more Health articles, visit www.foxnews.1eye.us/health.