There's a hotel in the HND International Terminal --
http://www.rph-the.co.jp/haneda/en/
Unless you're really desperate to save a few bucks (and I'm not even sure that the lounges are open 24/7), the on-site hotel makes the most sense.
I believe there's also a hotel connected to the domestic terminal but don't have that name at hand.