Essentially, yes.
The idea/theory is that sweat is largely hypotonic; i.e. it’s a very weak electrolyte solution, despite tasting salty. Therefore, as you sweat, you lose far more water than salt, effectively increasing the concentration of electrolytes in your body.
Adding an electrolyte solution in the form of a sports drink actually messes this concentration up even more, as does the advice to drink x amount of fluid every x minutes.
The theory that I like best is that the body is actually quite good at determining what it needs, and that drinking should be done to thirst, rather than any set schedule.
The science bit is here;
http://www.sportsscientists.com/search/label/muscle%20cramps
I work on ITU, and see this kind of manipulation of electrolytes, in particular with regard to AF as a regular thing. I would give 20 mmols of magnesium in 40 mls of fluid as a once a day thing, or potassium as 40 mmols in 40 mls over 2-4 hours.
In exercise, as a preventative, I wouldn’t know what is best, but I think there is more to it than drinking ‘lots’.