Answer by
dhuoda (1431)
They could be insect larvae or any kind of land or aquatic worm. Some fall into the water and breed, some are dropped by birds, some are laid there by insects. They gather in the filter because it is a nice safe spot away from predators and filled with oxygenated water.