Coral reefs are among the most species-rich, productive and economically valuable ecosystems on Earth but increasingly frequent pantropical coral bleaching events are threatening their persistence on a global scale. The 2015-2016 El Nino led to the hottest sea surface temperatures on record and widespread bleaching of shallow-water corals. However, the causes of spatial variation in bleaching are poorly understood, and near-surface estimates of heat stress, such as those inferred from satellites, cannot be generalized across the broad depth ranges occupied by corals. Here, using in situ temperatures recorded across reefs from the near surface to 30-50 m depths in the western, central and eastern Pacific, we show that during the peak of the 2015-2016 anomaly, temperature fluctuations associated with internal waves reduced cumulative heat exposure by up to 88%. The durations of severe thermal anomalies above 8 degrees C-days, at which point widespread coral bleaching and mortality are likely, were also decreased by >36% at some sites and were prevented entirely at others. The impact of internal waves across depths on coral reefs has the potential to create and support thermal refuges in which heat stress and coral bleaching risk may be modulated, but future effects depend on the response of internal wave climates to continued warming and strengthening ocean stratification.