Middle of the night leg cramps

CH

Stand up and the charley horse goes away.

Occasionally I get a charley horse in one of my legs in the middle of the night while sleeping. One time I got one in each calf. Wow, ouch!
Over the past few nights I have woken up in the middle of the night twice with a charley horse in my left leg.
According to WebMD, a charley horse is a cramp, particularly in the calf muscles, caused by muscle spasms, involuntary contractions of one or more muscles.
For me the cramps and muscles spasms are terribly painful. I used to try to massage them out.
Years ago I learned a tip that if you can stand on your feet the cramps will go away immediately. It’s true. But to get out of bed and stand up takes a lot of might and strength. But once I step my feet to the floor the cramps and spasms completely disappear.
I’ve heard a variety of reasons why I could get them. Such as dehydration or potassium deficiency. Many more possible causes are listed in the WebMD article.
According the MedLine Plus, when a muscle goes into spasm it feels very tight. It is sometimes described as a knot. The pain can be severe.
MedLine Plus also says, muscle spasms often occur when a muscle is overused or injured. Things that might bring on a muscle spasm include: Exercising when you have not had enough fluids (you’re dehydrated). Or having low levels of minerals such as potassium or calcium.
I drink a lot of water and eat fairly healthy so I am sure my potassium level is decent.
I guess I just keep doing what I have been doing.