Your iPhone can save some power during bedtime.
Shortcut: Charge iPhone and blink LED as automation
Optical signal from LED when iPhone charges.
HomeKit Automation: Create action with time delay
With the Shortcuts app, you can create HomeKit automations that wait a moment before triggering.
Shortcut: Keep iPhone battery between 20 and 80 percent
Keeping the battery between 20 and 80% capacity is easy with shortcuts and extends the lifespan.