The humidity sensor does not have a sleep mode, so your post title is misleading, at best.
That code is NOT putting the microcontroller to sleep. What it IS doing is setting an alarm in the RTC. When the alarm goes off, absolutely nothing happens, except that a register on the RTC is set.
Periodically, the Arduino reads that register, and sees that the alarm happened.
It is a very poor starting point for what you want to do.