The worms are not really worms but the larvae of the midge fly. You may notice the non-biting midge flying above the plant around the time the worms appear.
While their ecology is interesting - most people just want to know how to control this bloom that eats the MLVSS and can cause TSS issues in the effluent.
Option 1 - Strike
Strike is an EPA approved insect growth regulator (IGR) is applied in relatively low concentrations and preempts the midge fly life cycle and brings about control.
Option 2 - Aquabac XT
A Bacillus thuringensis based biological control agent that works for controlling midge larvae. The are killed when they consumer the spores in the Bt liquid. Aquabac XT is manufactured by Becker Microbial Products and is available from a number of vendors. I have included a link the label for Aquabac XT from one of the online vendors. http://www.allprovector.com/labels-msds/Aquabac_XT_Label.pdf
Dosing and application information for both products is included on the labels and websites. They are both effective at controlling the red worm/midge larvae. I have used both successfully in activated sludge and fixed film systems. Hope the information helps.