Generally I would fold the cost of staying in an inn into general upkeep costs, unless the party is very cash poor (that's happened before now, where the money has been spent down to the silver piece level just to buy a specific item).
Of the games I have played in, most DMs do have a tendency to charge too much. Now it's not suprising that wealthy-looking adventurers get marked for higher charges. But even so, you have to wonder how large a market there is for an inn that charges 1 gold piece a night for the common room! One DM did a nice job of letting the characters find the
really luxurious inns for when they'd done very well. In large cities there are a few exclusive places that cater to the adventurer or noble type crowd, no questions asked. There, a suite (with servants) costs up to 100 gold per night, and meals with rare foods and luxury wines can come in at 50 to 200 gold per head. No-one was ever forced to use these places, but it was a nice luxury for the party to live it up for a few days after escaping a really dangerous dungeon.
Also playing
Ars Magica I did some study about real inns of the medieval period. The first point is of course that they only exist where there's a steady market for their services. Pilgrim routes particularly would have inns of various qualities. One thing I found interesting is that by no means were people expected to sleep on the floors, even in common rooms. Often inns would keep large beds, which would be put down at night. People would sleep four to six in a bed, which was helpful as it kept you warm at night. Oh, and few could afford garments to sleep in so you got to know your neighbours rather well!

I try and remember some of these things when running D&D. But I accept that it's a different world and there is a greater market for the services of inns, if only because there is more cash wealth and more people travel.