Ocean warming affects the life history and fitness of marine organisms by, among others, increasing animal metabolism and reducing oxygen availability. In coastal habitats, animals live in close association with photosynthetic organisms whose oxygen supply supports metabolic demands and may compensate for acute warming. Using a unique high-frequency monitoring dataset, we show that oxygen supersaturation resulting from photosynthesis closely parallels sea temperature rise during diel cycles in Red Sea coastal habitats. We experimentally demonstrate that oxygen supersaturation extends the survival to more extreme temperatures of six species from four phyla. We clarify the mechanistic basis of the extended thermal tolerance by showing that hyperoxia fulfills the increased metabolic demand at high temperatures. By modeling 1 year of water temperatures and oxygen concentrations, we predict that oxygen supersaturation from photosynthetic activity invariably fuels peak animal metabolic demand, representing an underestimated factor of resistance and resilience to ocean warming in ectotherms.