Apologies for the tautology, but when you're sleeping you're sleeping. If a script were running it wouldn't be sleeping.
You need to schedule a wakeup in x time to shutdown. That's precisely what Nickel does, only for some absurd reason they don't include relevant values. I don't know if memory is bad enough of a concern to use 8-bit here in the first place, but you can just apply those 8-bits to hours and presto, you've got yourself a relevant realm of options at your disposal.
What you want is for the device to shutdown completely to preserve battery if you should let it sit for a few days. About 3-7 days probably makes the most sense as a default, although personally I'd go for something closer to two weeks.