I think its from the dirt. I really feed sparingly. And i also have a snail problem. So i doubt there are excess food. Ill start doing alot more WC lol
I have these too. My tank is pretty clean. Not sure where they came from. They actually live on the surface of the sword plant leaves where little bits of detritus collect. The fish eat them when I stir them up into the water. I'd rather they were not there, but I don't really see what can be done about it.
The detritus worms r harmless and aren't necessarily from over feeding, they occur most commonly in planted tanks, if u don't like them a geophagus will probably eat them.
They are called "grindal worms" and are completely harmless. Many fishkeepers culture them for their baby fish. I'll bet if you disturb your filter media you'll see a few spill into the tank. They also like to live in the tank just above the water line.
But if you have a ton of em then it could be due to overfeeding. A few of my tanks have them and I think they're great!