Several airport hotels offer "Day Use Plans". Finding one that's convenient for exploring Narita City is a little more challenging.
One option in the town itself is Richmond Hotel - 5,000 yen for a room that you can use from 12noon to 7pm. Price is 5000 yen. With that plan you could take a train to Keisei Narita station, drop your bag at the front desk, wander around town, come back, have a nap and a shower and then take the train back to the airport.
Other hotels have more flexible times, but they're far from the town center and so you will probably spend time on shuttle buses.