I haven't been able to find an explanation of cramping. My doctor said it really isn't that well understood. I get cramps after fifty or sixty miles, especially on the first long ride of the year.
I read somewhere that bananas might help prevent cramping because they contain potassium(?).
I'm wondering whether alcoholic drinks play a role in causing cramps.
Age might also play a role, but I don't know what to do about that.