It's a very common task in embedded development to need to reduce sleep or idle power consumption but in my experience it's never basic nor easy to do it right. Lots of times engineering teams just punt the issue and the customer gets less than great battery life or some other poor compromise is made.
Generally the hardest part is simply making sure that the device can wake up correctly and quickly enough under all situations. Also, tracking down unexpected power draws gets into a nice crossover between electrical and firmware design teams which can either be great or extremely frustrating for either side of that interaction.
Waking up from sleep is an endemic problem across devices. Just google "waking up from sleep" and you'll see all kinds of stuff for both Windows and MacOS. I'm not sure Linux has deep sleep.
I know it's been a problem on MacOS forever, like back in the 68k days. Some peripherals never come back from sleep and you have to power cycle them to get them to "wake up." And sometimes MacOS doesn't come back either.