They don't look like typical aquarium worms to me, more like the larval stage of an insect. Can you remove them to another container in a bit of water and take another pic or two?
It might be dragonfly or damselfly nymphs or it could be something that came with your plants.
It might be dragonfly or damselfly nymphs or it could be something that came with your plants.