A maintenance window has two sides: telling customers, and keeping your own alerts quiet. In Hyperping, a maintenance is scheduled once with its start, end, and affected monitors. It shows on your status page, can notify subscribers immediately or a set number of minutes before it starts, and pauses the affected monitors while it runs, so the planned work doesn't page anyone. You can also use it for monitors only, or for a status page notice only.
Announce it at least 48 hours ahead for anything customers will notice, and a week ahead for long or risky work. Many SLAs only exclude maintenance announced with a minimum notice.
Pick the lowest-traffic hours in your customers' timezones, from your own traffic data rather than assumptions. For a global product there's no quiet hour for everyone, so keep windows short, avoid end-of-month and end-of-quarter for anything finance-related, and make sure the people doing the work are awake and fresh.
Most planned downtime can be avoided. Rolling deploys, blue-green releases, and database migrations split into backward-compatible steps remove most planned downtime. Keep windows for work that can't avoid it, like a major database upgrade.
It counts in raw uptime, but most SLAs exclude it when it was announced in time. State which convention your uptime reports use.
Pause only the monitors the work affects, and only for the window. In Hyperping, paused monitors stop checking and resume when the window ends, so if the work runs long, extend the window rather than letting the monitors come back mid-migration and page someone.
As short as the work allows, plus time to roll back. If a task needs more than two hours of downtime, look for a way to split it.