In 90'ish temps I can count on 24 ounces every hour no matter the mileage. In 95° plus and going hard, that 24 oz. will be gone in less than 50 minutes.
I carry two bottles on the bike, one in my back jersey pocket and powdered mix for stops at water fountains along the way. I add enduralyte powder to my mix. Near the end of long rides in very hot weather, I sometimes feel the beginnings of a cramp in my quads if I push too much, but just slacking off the power and drinking a little more helps.
While I play the electrolyte game, I've not found an exact-foolproof-works-every-time panacea. Too much is probably just as bad as not enough, whether it's water, electrolytes or broccoli <grin>.
In your case, I think the biggest factor is you arrived in a slightly dehydrated state, then took off after a short rest and pushed too hard.