Green’s Dictionary of Slang

charley horse n.

also charlie horse, horse
[orig. baseball use c.1886]

1. [late 19C+] (orig. US) a cramp or sudden stiffness in the leg; thus charley-horsed, suffering from such a problem.

2. in fig. use of sense 1.