Leakages from damaged or deteriorated buried pipes in urban water distribution networks may cause significant socio-economic and environmental impacts, such as depletion of water resources and sinkhole events. Sinkholes are often caused by internal erosion and fluidization of the soil surrounding leaking pipes, with the formation of soil cavities that may eventually collapse. This in turn causes road disruption and building foundation damage, with possible victims. While the loss of precious water resources is a well-known problem, less attention has been paid to anthropogenic sinkhole events generated by leakages in water distribution systems. With a view to improving urban smart resilience and sustainability of urban areas, this study introduces an innovative framework to localize leakages based on a Machine learning model (for the training and evaluation of candidate sets of pressure sensors) and a Genetic algorithm (for the optimal sensor set positioning) with the goal of detecting and mitigating potential hydrogeological urban disruption due to water leakage in the most sensitive/critical locations. The application of the methodology on a synthetic case study from literature and a real-world case scenario shows that the methodology also contributes to reducing the depletion of water resources.