In sleep, you are safe from the revolting mechanics of living and being a prey to outrageous fortune.
The message is not so much that the worms will inherit the Earth, but that all things play a role in nature, even the lowly worm.