I arrived on 1 Jan ~ 9 PM and the Arriving Immigration lines (both halls) were quite long, at least 30 min. (I used an old VIP pass).
And the taxi queues were very, very, very long - maybe 30-45 minutes. I used an AoT car, and was home ~ 45 minutes after plane/gate-ing.
I'd leave some extra time for departing Immigration too, assuming you go landside for a hotel.
There are inexpensive hotels near the airport which offer transport, you could probably get into bed ~ 21:30/22:00, then up 05:00, so have some shower and rest off-airport.
There are a lot of people sleeping in int'l transit in BKK on any given night; and there are some nice sleeping arrangements: full recliners in the E wing, rows of padded seats.