@hopichek,
While Felix's method do work, please note it is only putting the ESP32 itself in deep sleep not the rest of the board. I don't know your power saving requirements for the sleeping periods, but with the suggestion* I described above you'll probably get an even lower power consumption during deep sleep.

*) if it works 😏