I think most respondents, and the poll results as I write this seem to bear this out, will fall into the "it depends" camp. That's certainly where I land on it. Every situation is different and I like to let players try anything they can think up. It won't guarantee success, but if they want to try something I'll allow it.
Specifically with resting in dungeons, its entirely possible, though probably dangerous. If the dungeon inhabitants are hostile, and they almost always are, it's a risky move. If the inhabitants are hostile and intelligent then the players are probably asking for trouble, but I still won't stop them trying.
For me though, it's a similar situation to the party packing up and leaving the dungeon/adventure site. That will absolutely make resting peacefully a more likely outcome, but that doesn't mean the dungeon remains in some sort of limbo, unchanging until they return. The denizens of the dungeon could move around, reinforce strong points, reoccupy previously cleared rooms or completely scarper and leave the party with nothing but empty rooms to poke around in... bereft of loot & enemies to fight.
In the end, I'm a big fan of seeing what the players come up with in response to the situation I've put them in and then improving my end of things as a response... it helps make the world seem like it's reacting to their decisions. So that's the long answer, but in short, it absolutely "depends".