Restoring energy
When running out of energy and there are no hearts within sight, fly as high as possible to start gliding. Even when totally out of energy, you can still glide downward and hopefully get enough time to find another heart. Male sure to angle yourself downward when you are out of energy to avoid plummeting to the ground.