Excessive pressure in water distribution networks (WDNs) may lead to undesirable effects, such as increased pipe failure rate and leakages. Pressure management (PM) techniques are indeed attractive to address these issues, reducing energy and water losses. Among the most recent PM techniques, pumps working as turbines (PATs) can be employed to both control pressure and recover energy. However, finding the best location, setting, and number of PATs to maximize both leakage reduction and energy production within a WDN is particularly challenging due to the severe nonlinearity of the problem and the large number of decision variables. To address the setting problem, a promising derivative-free nonlinear programming method is herein presented. The proposed method, modified to account for bound-type constraints, is capable of finding the optimal setting of a chosen number of PATs, given their position, direction, and machine type (characteristic curve), accounting for both energy and saved water volumes costs. In addition, this method is also able to establish whether the installed PATs must be bypassed or not. The proposed method capabilities are tested on a hypothetical complex WDN taken from the literature.