I find that explanation a little puzzling. Since I’m not thinking about things that happen during or immediately after exercise, maybe it’s an entirely different phenomenon.
If I find that my cramps don’t happen when I drink my electrolyte mix, I’m perfectly willing to believe it’s just a coincidence. After all, it’s not placebo controlled, randomized study. In that scenario, I have the cramps some number of times (true) and then based on some reading or conversations I’ve had with other people, I mix up my brew and drink it daily. After some period, I think “the electrolytes must have fixed it,” (also true) and since I’d rather not go through that regularly I keep drinking it and whatever caused the cramps goes away for some other reason.
The part that makes me hesitate is that the “…electrolyte imbalance, nutrition, or dehydration…” belief is very widespread - it comes from lots of people. That means a vast number of people have had the same coincidence. I have no idea what the real probability of the drink having fixed it or not having fixed is - and the second one is the important one here. Assuming having cramps or not and drinking the electrolytes are independent variables, the probability of a widespread coincidence goes down as the number having the coincidence goes up.
I went through a totally unrelated thing where I had a coincidence that seemed to fix a problem and ended up taking massive amounts of an herbal thing for years. I eventually concluded, “I hate placebos.”