Not sure how long you're in Moscow but another option is to stay the night before at the "AirHotel" which is right next to Domodedovo and a short walk to the airport (or they run a shuttle every 15 minutes).
If you're coming from Moscow I'd suggest the Aeroexpress as well; The last train leaves Paveletsky at 00:30 - if you miss that you'll have to do a taxi or the train / bus option that Temedar mentioned.
I've only been in the *A lounge at Domodedovo and can't comment on the other lounges but I know some are open 24 hours.