Sleep Despawn is a utility mod that automatically clears the world of hostile mobs when a player sleeps and skips the night.
Tired of waking up only to find a Creeper waiting outside your front door? This mod solves that problem. When a player successfully sleeps and the night is skipped, all hostile mobs are despawned from the world.