system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: What's actually happening when you get a charlie horse in your calf?
gpt
For those confused: Charley Horse is another way of saying muscle spasm that is intensely painful and can last for several minutes at a time. So, what causes these horrid spasms?

* inadequate blood flow to the muscle

* muscle injuries

* exercising in excessive heat or cold

* overuse of a specific muscle during exercise
* stress, most often in the neck muscles

* not stretching before exercise
  
* nerve compression in the spine

* taking diuretics, which can lead to low potassium levels

* mineral depletion, too little calcium, potassium, and sodium in the blood

* dehydration

So aside from the common ones such as not stretching and not having enough nutrients/vitamins etc, what is the reasoning behind these causes? Well for exercising in the heat or cold it actually causes your cells to either die (by exploding, gruesome right?). For stress and overuse it causes them to not respire aerobically (with oxygen) so they start respiring anaerobically (sans oxygen due to the huge demand which is what also causes your heart to race and your lungs to take deeper breaths) leading to a buildup of lactic acid (what causes soreness after exercising). Too much acid and the muscle tenses up as a reaction by the cells to prevent themselves from being damaged. 

So why does nerve compression cause cramps? It's because of altered neuromuscular control which is science-talk for "The muscle doesn't know what to do so it keeps doing what it was just told to do". If the last command was "contract" then the muscle will keep going until it starts to anaerobically respire and then succumbs to lactic acid. 

I hope this helps :)