  Umbral flashes are sudden brightenings commonly visible in the core of
chromospheric lines. Theoretical and numerical modeling suggest that they are
produced by the propagation of shock waves. According to these models and early
observations, umbral flashes are associated with upflows. However, recent
studies have reported umbral flashes in downflowing atmospheres. We aim to
understand the origin of downflowing umbral flashes. We explore how the
existence of standing waves in the umbral chromosphere impacts the generation
of flashed profiles. We performed numerical simulations of wave propagation in
a sunspot umbra with the code MANCHA. The Stokes profiles of the Ca II 8542
\AA\ line were synthesized with NICOLE. For freely-propagating waves, the
chromospheric temperature enhancements of the oscillations are in phase with
velocity upflows. In this case, the intensity core of the Ca II 8542 \AA\
atmosphere is heated during the upflowing stage of the oscillation. If we
consider a different scenario with a resonant cavity, the wave reflections at
the sharp temperature gradient of the transition region lead to standing
oscillations. In this situation, temperature fluctuations are shifted backward
and temperature enhancements partially coincide with the downflowing stage of
the oscillation. In umbral flashes produced by standing oscillations, the
reversal of the emission feature is produced when the oscillation is
downflowing. The chromospheric temperature keeps increasing while the
atmosphere is changing from a downflow to an upflow. During the appearance of
flashed Ca II 8542 \AA\ cores, the atmosphere is upflowing most of the time,
and only 38\% of the flashed profiles are associated with downflows. We find a
scenario that remarkably explains the recent empirical findings of downflowing
umbral flashes as a natural consequence of the presence of standing
oscillations above sunspot umbrae.
