Note that Rings of Sustenance don't help Elves (who don't sleep). Also note that Divine casters don't need eight hours, just the "right time of day" to regain their spells.
Rope Trick is nice, and (IIRC) can't be dispelled because you're "on another plane" when inside it (I could be wrong)... Alarm is also good for alerting you to attacks. Put it outside, in the hallway.
If the room you're staying in is a problem, why stay in that room? I'd set the Elves to searching for secret doors, myself. If the enemies know where you are, it's time to move...
More generally, in the future, long-lasting illusions over the door (to make it look like a wall of stone, for instance) might work, if the enemy is unfamiliar with the area... (if not, they'll know that there should be a door there). A Rod of Security would be nice. A Rod of Alertness less so.
As for Teleport, just becase you can't leave the mountain with it doesn't make it useless. Perhaps it can go up/down a level? If so, multiple spells might allow a way out (especially if you do the "outsides" of each level, first, and find an entrance/exit from which you can zip home). Also, supposing that you find an underground lake, or something, you might be able to put a hut (or somesuch) on the bottom, and then use Teleport to get to/from it... That would stop MOST enemies (but not, say, a Kraken, nor undead).
Wall of Force is always nice. Wall of Stone is also good, as previously pointed out, especially if used in conjunction with Rock to Mud (makes it easy to get out, in the morning). Soften Stone might even be pressed into service to MAKE a hideout out of a wall! Then again, one of those pit traps, braced from below so nothing can fall into it, might make a rest stop for the night.
Look around you, as you explore, and try to find a better place to hide. Look at the spells you have access to and ask: "How can I use this to hide us for eight hours?" I'm sure you'll come up with a dozen ways, depending upon your class and level.