OP,
As allset2travel noted NRT closes down for flight departure until 0600 in the morning and the counters usually don't open much before 0400. You'll be much better off getting a room in Narita town and then either exploring the town there or heading into Tokyo proper after checking in. You'll have a lot better sleep that way. You could also try the capsule hotel in Terminal 2 but IMHO for a long layover I'd much rather stay a regular hotel.Capsule hotels, in general are more geared to the salaryman who's missed the last train home after a night on the town.