Houseplants are a fungus gnat paradise. They thrive in moist soil and feed on decaying organic matter, algae, and fungi. Adult fungus gnats create a nuisance, and the larvae damage plants by tunneling into succulent plant stems and roots. Under normal circumstances, I'd recommend keeping the affected plants' soil free of decaying leaves and allowing the top of the soil to dry out between waterings. Dry soil kills larvae, reduces fungal growth, and prevents adults from laying eggs.
But your situation calls for a more sophisticated plan of attack. Worms, especially the composting worms you have added to your pots, do not do well in dry soil, says Patrick Bohlen, Ph.D., director of research at the MacArthur Agro-Ecology Research Center of Archbold Biological Station in Lake Placid, Florida. "These worms sometimes migrate from containers when conditions become less favorable, which means you could end up with earthworms on your living room floor!"
Here are some strategies for keeping gnats out and worms in. Place yellow sticky traps horizontally on the soil surface. They might not be pretty, but they allow you to kill some adult gnats and monitor their populations. If numbers are high, apply beneficial nematodes (Steinernema feltiae or S. carpocapsae) that will attack the larvae. These nematodes are sold commercially under the names Scanmask and Nemasys. Follow the application instructions on the package. Oddly enough, your worms might even aid the fight against gnats. "Earthworms have been shown to increase the dispersal of Steinernema in some cases," says Dr. Bohlen.
Finally, there's always repotting your plants in sterile soil with less organic matter. Of course, that means bye-bye worms; you'll have to relocate them.
photo: (cc) EBKauai/flickr