Answer: You probably uncovered the next generation of fungus gnats. They hide and breed in decaying, moist organic matter. The white worms are most likely the larvae of the gnats. Since you've removed the topmost layer of soil, you may have removed the eggs, too. Try putting a layer of decorative stones on top of the soil to keep gnats from laying their eggs. The worms will die if they can't escape, and that should end the problem.
Q&A Library Searching Tips