Don’t miss your alarm, even if your battery is low. When your device is at rest, Doze automatically puts it into a sleep state. So your phone can still set off your alarm in the morning even if you forgot to charge it.
Android takes care of this for you. Doze mode is an automatic feature of Android 6.0 Marshmallow OS.