On hydrochlorothiazide, the kidney eliminates more potassium and magnesium through the urine. Diet is the first lever for rebuilding these two minerals, and the easiest one to keep up day after day.
Potassium is concentrated in vegetables and fruit: potato, sweet potato, spinach, lentils, beans, avocado, dried apricot, and banana. Magnesium comes mainly from green leafy vegetables, nuts such as almonds and walnuts, pumpkin seeds, whole grains, and dark chocolate.
Several of these foods provide both at once: spinach, lentils, beans, pumpkin seeds. Spreading them across your meals covers a good share of your needs, on top of your treatment. Orange juice and dried fruit such as raisins and prunes easily round out the potassium intake.