Follow the bag and the boarding pass
An airside room may work when your bags go straight through and the next boarding pass is available. If a separate ticket requires collecting and rechecking baggage, find out where that happens and when the next counter opens. For a landside hotel, check entry requirements for each traveller with the relevant authorities.
Count hours in the room
Subtract transfers, access checks and the return to your gate from the advertised layover. Record the local date on both sides of midnight and ask which date the hotel uses for the stay. A six-hour room block may be a better fit than a nightly rate for the wrong date.