I reckon cramp down to genetics and how much you sweat and fitness levels ,I’ve suffered over the years and been at various fitness levels over the years to ,I’ve noticed as I’ve tried to get my fitness up or raced harder than I ride normally cramp happens .
I’ve had it about 3 month agony a 25 mile MTB ride but didn’t drink enough so last few months I’ve made sure plenty water before I ride and a torq drink hour before then I’ve added Pink salt or tablytes to my bottles and made sure I had at least a bottle every hour and refilled at tea stops .
Not had it since been riding 30/40 mile MTB rides and 60/70 mile road rides
Some people never get cramp from riding some mates only drink I bottle over 3/4 hrs we all different