Sump pumps are not just for drainage, they can also be used to collect water from the ground and lower it down into a sump basin. Drain flies are attracted by stagnant water in these basins and will lay their eggs there. The larva of drain flies feed on decaying organic matter thats accumulated at the bottom of these basins and is sometimes called sludge.