The usual cause of cramping is salt/electrolyte depletion. Very common on long rides as you sweat out the salts and don't replaceme them adequately (i.e. only drinking water to replace the fluid loss). Electrolyte tables like Zym and Nuun are the modern fix, I usually use Nuun tablets in every other bidon of water (every bottle on hot rides). The old school fix is a banana which is high in potassium.
Calcium is also pretty important. Part of what you sweat is calcium and it needs to be replaced to prevent some cramping. I advise chocolate milk.
Calcium is also pretty important. Part of what you sweat is calcium and it needs to be replaced to prevent some cramping. I advise chocolate milk.