The process of cultivating edible and medicinal mushrooms results in considerable biomass waste, which can be a rich source of bioactive compounds. This research aimed at optimizing the yield of polyphenols and improving the antioxidant potential of extracts derived from the stem waste of Flammulina velutipes (FVS). Notably, this investigation is the first to harness FVS as a raw material for the extraction of total polyphenols by nonionic surfactant-integrated ultrasound-assisted extraction (UAE) techniques. Through the screening of nonionic surfactants, it was determined that Genapol X-080 exhibited the highest efficacy in extracting phenolic constituents. When comparing the total polyphenol yields obtained from FVS via various extraction methods, it was found that UAE yielded significantly more polyphenols compared to both stirring-assisted and heating extraction methods. Furthermore, the sustainability analysis highlighted that the combination of nonionic surfactants with UAE presents a more environmentally friendly option, achieving a score of 0.73 in the Analytical Greenness Calculator. To optimize the extraction parameters, response surface methodology was utilized. The ideal conditions determined were: an ultrasound time of 90 min, a temperature of 44 °C, a 75 % ethanol concentration, and ultrasonic power set at 160 W. Comparative assessments revealed that the refined UAE method enhanced the extraction rate by 27.35 %, while simultaneously decreasing energy use by 66.67 %. Moreover, evaluations of the antioxidant levels in the samples showed that the optimized FVS extracts consistently demonstrated superior antioxidant activities across all evaluated free radical scavenging tests (DPPH, ABTS, FRAP, and hydroxyl radicals). These results provide significant insights into the effective utilization of mushroom stem waste and advance efforts in the valorization of biomass byproducts from the mushroom industry.