Water distribution networks have to face the challenge of providing for a growing population with efficient management of water and energy. Pressure control in water networks is an efficient strategy to reduce leakage, which is usually carried out by installing pressure-reducing valves. Because the operation of these elements involves energy dissipation, the replacement of pressure-reducing valves by hydropower turbines has been widely analyzed. Thus, in this work a methodology focused on the detection of the optimal location and number of pumps as turbines (PATs) to maximize hydropower generation in gravity water distribution networks is proposed. The methodology considers a mathematical optimization and evaluates the real PAT performance at each node. Installation costs and payback period have been considered to determine the viability of installations. The application of this methodology to six water distribution networks showed potential hydropower locations in three, with values of daily recovered energy from 43 to 231 kWh. Although the optimization methodology developed here is not suitable for complex looped networks due to the computational time required, for branched networks it is a powerful tool offering decision makers information about hourly power, total installation costs, and payback period at each potential node in a network.