Just recently completed a 100 mile Mt bike race in Minnesota. An awesome event.

However I ran into serious problems after mile 60 and onward to the end. I kept suffering from serious abdominal cramps that hit me all in the front up to my chest. It limited my breathing at many times.

I had no choice but to stop and rest and walk it off for all the final 39 miles to the end. Very brutal and took me a long time. to finish because of this

Now i like to know what i did wrong for this to happen.

I drank lots of water and did take my Gatorade as well during ride.

I did have some light food at some of aid stations on route and did stop briefly to refill water.

What type of physical things did i do wrong to cause this to happen.
It was very sharp pain that basically prevented me from riding through it.

suggestions and advice please