they also look like black/brown worms to me. i grow these aquatic worms. to feed to my fish. did you bring home some new fish? they might have came from the pet store. your petstore probably feeds these things to there fish. it only takes a small peice for them to start growing. they are probably my favorite food to feed killies, rainbows and corries to get them to spawn. about a 1 USD a oz for these things live at pet stores
they normally have there butts out in the air like that when they are serching for food in the tank. the part waving in the water isnt the're heads it more like there a$$. which have photo sensitive cells that warn them when lights change which usually tells them that a predator is nerby. then they dart back into the gravel
you should fish them out and start culturing them. some of the best foods to get fish to spawn. but dont give them to african ciclids since it somtimes makes them sick.
i dont think its a tubifex since it looks too thick and tubifix are hard to grow to a full inch. and it looks like the bottom of the tank. tubifix normally grow on the top water line of the tank.
125 ga. Pressured co2. T5ho