Leg cramps . . . when I was 45 yrs old, first night out on a week-long cross-state bike ride, overworked from biking serous hills & being short on sleep--I got introduced to leg cramps. Thighs locked up tight--it's excruciating. Had never had them before and had no understanding of them. I learned fast.
With age, however, they are now a lousy, constant threat. Have learned to mostly prevent them, unless I forget or get lax about prevention. Bananas--have daily gone through 3--5 on hot summer days, and I don't like bananas. Now my go-to is coconut water. Two to three cans for any workday. Copious water, of course. Bananas when I can force them down. Hot shower after work is essential (not sure why, but it works). And vinegar. I swig apple cider vinegar from the bottle, can get three good swigs before gag reflex puts a stop to it. Have to keep a bottle of vinegar at the side of the bed, for the rare times when no amount of prevention worked. Oh, and no sugar late in the day. I used to mix maple syrup and peanut butter for a late evening snack--had to give it up.
My thighs are constantly at risk for cramps, but a builder friend--lots of ladder and on your feet all day--Frank said he gets 'em in his calves. Terrible either way. Frank's wife is nearly deaf, can't hear much of anything without hearing aids. He said he was out of the bed & on the floor one night, writhing with pain, and only way to get his wife's help was to throw the cat on her.