The term "charley horse" has been around since the 1880s, when players on the Chicago White Stockings baseball team went to the racetrack and everyone bet on a horse named Charley — except for one player named Joe Quest.
When the horse the others bet on came up lame after the last turn, Quest is alleged to have told his teammates, "Look at your old Charley horse now!"
After that, "charley horse" became the accepted name for leg cramps.
What causes these painful spasms? Orthopedic doctors at the University of Toledo Medical Center say they're due to involuntary, repetitive firing of dysfunctional nerves. And they don't start in the muscle tissue.
That's why athletes who are well-hydrated get cramps (although dehydration can cause them too), why you get them in bed at night, and why loading up on potassium and salt doesn't necessarily prevent them.
The nerve dysfunction can be aggravated if you don't stretch regularly; if you don't get regular physical activity (but don't overdo it); if you sit for long periods of time; if you are overweight or pregnant; or if you take diuretics and/or develop electrolyte disturbances.
To prevent a charley horse, start by walking as much as possible, with a goal of 10,000 steps a day. Wear supportive, comfortable shoes. Hydrate well. And avoid intensely exercising the same muscles day after day.
When they do happen, a swig of dill pickle juice can quiet down the contraction. The theory is that the juice overloads nerve receptors in the mouth and esophagus to calm the nervous system's excessive misfiring.
Restoring your electrolyte balance with Pedialyte or Gatorade also works.