Just a data point here - I've done this in Dubai at Le Meridien a number of times. The flight I take back to the US leaves around ~2AM, so I head to the airport at like 10:30 or 11PM (way early, I know, don't judge). I always check out, with the front desk, to make sure I get a paper folio (just in case, for expenses). If you pay for the night, it shouldn't matter when you leave. I've always gotten credit for the night.