I wouldnt think house rules are needed... I imagine the simplist way to approach it is to put a (maybe mini) village in the dungeon (maybe the PC's have to 'clear' the village out... ALso, depending on the layout of the dungeon it may make sense to allow the players to onwardly advance clearing out the dungeon, or at least temporarily clearing out regions of it, that act like forward bases they can rest at...
if they want to advance then they may not be able to rest (since the dungeon would most likely be teeming with enemies; take advantage of enemy home feild advantage and traps and wandering creatures, a mega dungeon isor can be a city a slum a cavern a base of operations a small hamlet anything and all in one... make the dungeon dynamic and interactive with people DOING THINGS (I know this is easier said than done believe me)... Dont penalize them for wanting to rest I would say but place reasonable restrictions on them that REFLECTS OR TAKES INTO ACCOUNT WHAT THEY CHOOSE TO DO; if they are 10 layers deep and have cleared a portion of that level; well now they are stuck; the upper layers have surely been overrun (again!) and continuing is dangerous because, well monsters are dangerous; going further means not knowing when you can rest next and attempting to reach the surface is neigh foolish as you have only one more day to reach the goal and youve been down here in a teleport locked antimagic filled dungeon for weeks... etc....
I think there are many ways to NOT in any way care how often the players ATTEMPT TO rest and still create suspense and difficult combat... the players maybe need to be somewhat understanding or concessive in action choice thogh I dont know... Hopefully this was somewhat helpful (as I am not sure if i even answered the opening question)
EDIT: also there ARE VARIANT rules in the DMG that make resting MUCH LESS attractive (1 week for long and 8 hours for short)
EDIT: as a note: clearing out a forward base in a hostile mega dungeon may be a very hard task in and of itself and may take man power time and resources, hirelings, tras, lookouts, wards, etc...Dont be unrealistic (and yes I know there is a fine line between a 'realistic' dm and a 'relentless' dm and i guess this is what we are talking about... but this balanced may be achievable and quite 'naturally' so by the DM NOT caring so much yet also placing REASONABLE restrictions on their resting (also one may have to CONSTRUCT their encounters with this i mind such as ANTICIPATING a GAUNLET like portion of the dungeon wher they are 'forced' into a series of battles due to scenario (i would say this restriction should be organic to that portion of the dungeon and what is going on) Or another exaample: maybe they want to storm a keep; it may take a whole session; mere minutes potentially in game but a series of hard battles; or the players forward base is NOW being seiged and well goodluck resting in a seige of ogre mages blasting cones of cold at the dungeon walls all day and night; at low levels exploit that feature of the party... at lower levels its generally easier to challange players; at higher levels, EXPLOIT the fact that enemies are also high level and badass and accept that high levl players SHOULD HAVE A LEVEL OF control over the terms of the combat THEY CHOOSE TO ENTER...