The answer is that hypokalemia (low potassium) frequently results in leg cramps. Heart doctors see many patients with high blood pressure and heart failure. And in this setting, it is common to see these patients taking water pills to remove the excess fluid in their bodies. One of the effects of water pills (diuretics) is to decrease total body potassium. So in that setting, when patients present with leg cramps, a common cause is low potassium. And this is one of the reasons why frequent blood tests are required for patients who are prescribed diuretics—to make sure that their potassium level doesn't get too low.
Unfortunately, there is more to this story. Excessive use of diuretics leads to volume depletion, and volume depletion alone can cause leg cramps. In fact, one of the tricks kidney doctors use to determine if we have removed enough fluid during a dialysis treatment is to remove fluid until the patient starts complaining of leg cramps. Also, there are other metabolic causes of leg cramps which include diabetes, alcoholism, and hypothyroidism.
So the moral to the story is that if you are a heart patient and are on diuretics and start having muscle cramps, talk to your doctor. Regional experts in heart failure like Dr. Van De Graaff have much experience in determining the cause of the problem and providing a solution. Although low potassium is a frequent cause of leg cramps, there are many other possibilities as well. People run into problems when they try to self diagnose, change their water pill dose on their own, increase their potassium intake drastically without supervision, etc.
By the way, if you have a kidney, blood pressure, stone question, etc. that you would like answered. Please feel free to ask!