To meet the growing demand for freshwater, many regions have increased pumping of groundwater in recent years, resulting in declining groundwater levels worldwide. A promising development is technical change regarding groundwater substitutes such as desalination and wastewater recycling. However, because these technologies are energy intensive, optimal implementation also depends on future energy price trends. We provide an operational model for the application to reverse-osmosis seawater desalination. With this foundation, we outline a research agenda for extending the framework to other groundwater substitutes and for adaptation to climate change.