Some DMs obsess over the ecology of their dungeons – making sure every monster makes sense. Unfortunately, unless you take some pains, you’ll have few large predators. And those are what make the dungeon interesting!
I have a short process by which I can populate a dungeon and have it usually make sense.
The monsters must be Underworld types, or else from the aboveground terrain.
Where else did they come from? Humanoids can travel great distances for their own reasons, but finding a deer in the upper level of a desert dungeon just seems weird.
Make sure they can move around
You want locked doors, because those are fun. And you want traps, for the same reason. But both of these impede the movement of your monsters through the dungeon. You have to assume that if two monsters pass in a narrow corridor they might want to attack each other.
So you need most paths through your dungeon to be open, and you want multiple paths among the same areas. It helps to include small tunnels and pipes that the PCs can use if they have shrinking magic or an expendable Wizard’s familiar, but mostly are used only by tiny monsters.
Start with the plants
The basic food your monsters will eat are plants. Plants can thrive off fertilizer in the form of slain monsters or dead plant material, or just magic and the foul Underworld vapors. Plants there for color include moss, lichen, mushrooms, slime, small ferns, etc. These can be luminescent, taste good, be nutritious for PCs, or maybe are just crummy plants with no good use.
Even if an area is closed off by doors there will be plants there.
Vermin live off the plants
Vermin include spiders, tiny lizards, roaches, snakes, flies, frogs, caterpillars, worms, centipedes, beetles, bats, moles, rats, etc. These eat plants or other vermin. You also don’t need to worry about where they come from unless
Even if an area is closed off by doors there may be many vermin there. But they need a larger space with plenty of plants and other vermin around.
Small monsters live off the vermin and plants
Small herbivorous monsters and small predators will eat plants or vermin, and the carnivores may eat other small monsters. These include the larger snakes, frogs, anything with 1-2 HD really.
These small monsters cannot slip under doors or through tiny cracks. They need small but visible pipes and tunnels to sneak around, or a quite large enclosed area with many plants and vermin, and possibly other small monsters.
Large predators live off small monsters
Large predators (the size of a wolf or bear) will eat small monsters and rarely vermin. Large herbivores don’t tend to survive dungeon life unless they have a way to escape (flight and ceiling space to hide in, or underwater).
Large predators can move through areas the PCs can move through. This is the main reason why you want open/broken doors or just open archways instead of closed and locked doors. Large predators also tend to eat an area clean if they’re trapped in there, and so need to be mobile.
Some creatures don’t need to eat. These include Undead, Golems, and some others. It’s worthwhile to scatter these creature types around to pad out the monster density without increasing the large predator ecosystem burden.
Decide what large predators you want in the dungeon. Then add dungeon space and fill it out with small monsters of little consequence. Add to room descriptions information about plants and vermin that will likely be present. Flesh out your random encounter tables with these non-combat encounters.
When you stick a monster in a room, ask how it got there, where it can go next, and what happens when it sits around for a few weeks. For intelligent monsters, ask yourself why it’s there and what changes it will make.
The Deepspawn was created strictly to feed the large predators in the dungeon. Whatever it eats, it will birth in the future. So if it eats a deer, it will spit out deer every few days. This, to me, seems a little too weird to use more than once ever.
In real life salmon swim from streams down to the ocean, eat a bunch of ocean food, then swim upstream again to spawn and die. Their babies live in the stream for a couple years and then swim out to the ocean. This cycle brings nutrients from the ocean back inland and enriches the ecosystem of the stream and areas around it. Consider using monsters that leave the dungeon to hunt. Predators moving from level to level will help move nutrients (and treasure) around.
A profusion of plant life sustained by magic or the Underworld can support a huge small vermin population. Small monsters hang around these “watering hole” areas. This basis should be present in any dungeon with an ecosystem. If you habitually include it, the presence of large predators becomes easy to explain. If the dungeon entrance is a great cave shaft or well covered in vegitation, and the floor of the entrance is teeming with life, it could support the whole first dungeon level’s predators.
Monsters that eat rocks give a reason for more dungeon spaces and also aren’t an ecosystem burden. They can also create environmental hazards (cave-ins, unstable floors) and pathways around the dungeon for small monsters.