I take 1-2/hr., but everyone is different. You know you're taking enough if you feel that drinking about 1 bottle/hr sounds like a good idea. IOW, take Endurolytes to create thirst, then drink to that thirst. If you feel like you're forcing water, take more. If you are thirsty all the time, take less. My metric is that I like to drink enough so I have to pee every 2-3 hours. If I don't, I know I have to drink more, i.e., take more Endurolytes.
But yeah, you probably just overdid it. Cramps seldom develop from electrolyte imbalance, almost always from overuse. In spite of the conventional wisdom to the contrary. Studies of LD athletes have confirmed this.