Electrolytes
My cure for this problem is drinking 16 ounces of 50% V8 juice/ 50% Orange juice before my ride. It has the proper mix of Sodium and Potassium Salts plus several types of sugars. After this, you can drink up to four bottles of water during your ride, to maintain your hydration.