I used to suffer from cramps and tried all the remedies above.

Nothing seemed to work as the cramps would start around the 80 km mark.

I discovered it was calcium and now as long as I hydrate properly and consume additional calcium before and during my ride I am alright.
I usually supplement with tablets before and liquuid in one of my bottles.