Might be planaria, in which case I would say you are probably overfeeding the tank. I would cut back a little on how much you feed the tank, but no big worries. Most fish eat these little worms. The reason they do not get noticed until you overfeed is because the fish eat them so readily, but when the tank has an abundance of nutrients (more than the fish need) the worms are able to multiply faster than the fish eat them, usually.
If they are not planaria it is another worm of some sort so basic principle still applies, in my opinion.
(Just tell your non-fishkeep friends that the worms are a rare worm from some weirdo location that only a few people in the world have... that'll get you cool points.

)