I have a charger "controller" that I developed in MicroPython for an SAMD51 board. It can do sleep just fine, as long as you set up interrupts properly.
But I just need to do a bunch of ADC readings and some simple if/else conditions, so it doesn't require any real non-trivial computations.