Hmm, yeah I did some digging. Seems there’s a deep_sleep() function in Micropython for the ESP32 and ESP8266:
https://docs.micropython.org/en/latest/esp8266/tutorial/powerctrl.html#deep-sleep-mode
I found this little micropython library for entering dormant mode on the Pico / RP2040: