Tensions between delivering water for human uses versus environmental benefits are increasing in many arid and semiarid regions, potentially causing irreversible environmental consequences. The issue of how to balance these competing uses of water is of fundamental importance, especially with projected increases in the variability of water resources due to climate change. In response, a stochastic resilience optimization model is developed to assist decision-makers to optimally determine water releases from storages for environmental purposes and to measure the resilience of a system for given risk tolerances. The model, with sensitivity analyses, provides a valuable tool for water planners to minimize the risk of irreversible consequences and to optimize for resilience taking into account weather uncertainty, existing environmental conditions, and water storage levels. A calibration of the model to the Murray-Darling Basin and also the Goulburn-Broken catchment region in Australia highlights its potential to improve decision-making at multiple spatial scales and over time.