When I tried to cook without any processed foods, and added no salt, I had cramps and dizziness. Eventually I realized that plain chicken, along with fruits and vegetables, simply didn't have enough salt - that there is a good reason for salt to taste good to us.
For a while, one of my relatives became convinced she had too little magnesium, and so was taking extra, and ran into severe problems.
If I understand right, too much or too little of any of the electrolytes - including sodium, calcium, magnesium, potassium, etc., can cause cramps, because all are involved in muscle or nerve control.
So maybe people who cramp while exercising, and can't attribute it to feminine time-of-month issues, or something else, can look into their diet. But as I and my relative demonstrated, self-diagnosing that sort of thing without an objective test can be quite dangerous, especially if you go overboard. You can get a fairly comprehensive blood test that looks for that sorts of thing.
Of course, any serious exercise alters your electrolyte balance. E.g., you sweat out your electrolytes, and maybe you go to the bathroom more. Maybe you don't sweat as much while ice skating as while running, or aerobics, or weight lifting?