Here is a post I made about my homemade electrolyte mix.
The salts are quite cheap, the flavoring is the most expensive part, and will take the most experimenting. I’ve recently tried some ‘powdered fruit’ which has not gone well. The pomegranate powder was inedible as a drink, the raspberry is tolerable. So far the citrus flavors are the only ones that work reasonably well.
I find that these taste much better cold, and less good as they warm up.
I have been experimenting with adding sugars to the drinks. Adding 20 grams of a sucrose/fructose mix make it very sweet. Adding about the same amount of maltodextrin gives a much better flavor.