Response surface methodology was applied to optimize the recovery of ergosterol from an agroindustrial residue of Agaricus blazei Murrill, by comparing conventional (heat-assisted extraction, HAE) and more sustainable nonconventional approaches (ultrasound and microwave-assisted extractions, UAE and MAE, respectively). A circumscribed central composite design was employed to optimize and describe the interactive effects among variables of the HAE, MAE (time and temperature) and UAE systems (time and ultrasound power), and their performances compared with the standard soxhlet extraction system. The optimum conditions were predicted as 150 min, 81.6°C for HAE, 30 min, 400 W for UAE, and 25 min, 134.6°C, for the MAE system. The UAE system was identified as the most appropriate technique to obtain extracts with the highest amount of ergosterol, followed by MAE and HAE. Overall, these results demonstrate the potential of using the fruiting bodies of A. blazei as a suitable source to obtain ergosterol-rich extracts, which can be used as an ingredient for various biobased industrial applications.