Because the composition of sleep changes across the night, the way you shorten a night determines which stages you lose.
If you delay bedtime but still wake at the usual time, you compress the front of the night. The early cycles are where N3, slow-wave sleep, is concentrated, so a late bedtime costs you mostly deep sleep. If instead you go to bed at the usual time but wake early, you cut the back of the night, where REM periods are longest, so an early wake-up costs you mostly REM. A night shortened at both ends loses both, but the two losses are not interchangeable: they come from different parts of the architecture.
This also connects to homeostatic rebound. After a night with reduced sleep, sleep pressure is still elevated, and the next night typically contains more slow-wave sleep than usual, especially in the early cycles. The homeostatic system behaves as if it is tracking a debt and repaying it preferentially in the deep stage. REM rebound can also occur after REM-specific loss, though it is often less tightly coupled to a single night.
Use the simulation to move bedtime later, move wake time earlier, or both, and watch how the stage bars redistribute. The goal is to predict, before you look, which stage will shrink most.