For leg cramps it all depends on how fast you are loosing electolytes/trace elements.
I don't ever use gatoraid full strength. Two weeks ago, paddling/hiking in 95F heat, I could have used some, though.
Trace elements, zinc, manganese, etc. are just that. Even if you loose half of them they continue to work. Though I suspect they do reduce your performance slightly, I seriously doubt that you will get sick from this loss for a day of sweating. Even two is probably not important. A week, yes, you may notice a little performance drop off. Mostly, these are found in wild water, though. So, just keep drinking water and they will be replaced to sustainable levels. Not all are gotten through water, though. But a single vitamin per day will cover you there. Cramps are usually caused by 1) dehydration 2)overuse of muscles 3) lack of NaCl. These are the big three. Even potasium is down on the list after the top three.
Water: Drink more and more often. Blood is composed of a lot of fluids besides red blood cells. This carries a good proportion of your oxygen. Removing this will decrease oxygen to cells, leading to cramping. Slightly over hydrating will actually allow you to carry more oxygen to the muscles...Drink when climbing or hiking.
Lactic acid, is built up in cells as part of working them. This is caused by working a muscle without enough oxygen and is a way for your body to burn more glucose to make cellular energy without oxygen. Not bad, you body knows how to deal with it, but, runners and other athletes may need to deal with it quicker. This eventually causes cramping. It hangs around in the cell waiting for more oxygen to be burned...recovery mode. Without large amounts of oxygen, it stays in your body to be processed later. It makes you feel tired after 4 hours of running on a trail. Or 1 hour of hiking if you are not in "shape." Muscle aches, cramps are symptoms... overuse, generally. Often stiffness in the morning, or lack of "zip" in the morning is ascociated with this, too. Up to 36 hours in the body.
NaCl (table salt) is perhaps the most important electrolyte by about 20:1. All are important, but salt is necessary for proper nerve function. Sodium is basically the nerve component. This is maintained at specific levels in nerve endings, and if in short supply, can cause misfiring. You get cramps, or, worse. It effects all nerves.
Much of this is simple high school biology from 50 years ago, so, don't pick it apart...I was also told 50% of what I was being taught was wrong. It's just an overview of the top three reasons.
I highly recommend a simple shake of salt into your drink when hiiking. If you are really working hard, maybe...maybe two. It will add water and salts to your systems in 4-5 minutes. Sugar (glucose/dextrose) is needed, soo, some sugar is OK, also. Table sugar is complex polysacharide(sp?), usually sucrose, and takes about 5-15 minutes to break down in your digestive system. Take a 5 minute break, eat a little. The body knows what to do.
I also use Litesalt in about a 25% ratio. Basically, this is because it helps with nerves and circulation a bit. Not much, but it is easy to insure enough. It supplies potasium. Too much and you can get sick. Potasium is highly toxic in large amounts, but it is needed for nerve function.
This is the formula I have used for many years. 3 parts table salt, 1 part lite salt in the salt shaker. 1 dash per 500ml of water. Coupled with a vitamin (with trace minerals) in the morning and this will work to stop most cramping. Not fatigue, but cramping. IFF you are working hard, add two tablespoons of glucose. It helps when your liver cannot produce enough to supply your body. A tablespoon of cider vinegar works, or other acidic stuff (Vitamin C, etc.) All in a 500ml bottle. This is the old farmers drink I got from my grandfather 50 years ago out haying. It works.