Sound like detritus worms. Harmless. If they are threadlike, float around and then squirm about like they have been electrified, and then float around again, detritus worms. Normal part of an aquarium. They like to hang out in the substrate and eat organic material.