I was under the impression that cramps are from an imbalance of potassium, calcium and magnesium. Supplementing the one you are lacking generally resolves the problem, but its hard to know for an individual without trial and error unless you are 100% sure of your diet.
I mentioned in passing to a nurse at my gym that I get calf cramps from running. She told me to get a supplement from Amazon called Calm. It eliminated the cramps, and after an especially rough squat workout I used to get cramps, it also took care of that. Although you need to be very careful with the dosage, it is basically a laxative.
Just like if you take some extra Zinc (30mg-50mg picolinate) for a variety of reasons - you have to take a bit of copper with it, or eventually your copper supplies will be drained and start causing issues.
I’m not 100% sure if it was zinc but I supplemented zinc for like a week then had the worst constipation of my entire life. Like, wife had to run to the pharmacy to resolve it while I cried in agony sort of bad. So yeah, be careful with how you supplement!