I'd encountered something similar a few year's ago, presented as a diarrhea remedy from the World Health Organization, but being from outside the US it gave all measurements in grams, and being an American I have no kitchen scale, so I estimated all the ingredients and made some substitutions but still found it very effective at ending diarrhea and keeping me going on hot days! This other version of the recipe sounds easier to prepare and probably more tasty than the WHO's.
I used to be disdainful of hydration drinks -- most of them taste bad, and most of the commercial ones are made with high-fructose corn syrup instead of glucose or sucrose, and I'd never needed them, so they couldn't be that necessary, right? It was my hiking trip at the Grand Canyon that changed my mind: the Park Service very strongly recommended bringing hydration drinks, and I took all their recommendations, and I found that under those conditions (I hiked the canyon in August), a salty drink was not only drinkable, it was what I was craving. So when I started my bike trip, I made sure to pack a can of powdered drink mix.
Of course I emptied the can very quickly, and I couldn't find another source for the powder, and the stuff you can buy in gas stations is pre-mixed with high-fructose corn syrup and really isn't the same product at all. So I started buying Tang powder (which is made with sucrose, and is available at nearly every grocery store in North America) and adding salt to it, and it worked just about as well. Your mileage, of course, may vary.