Impossible to say what kind of worm, or even if they are worms, from your description and the picture. good closeup of one would be very helpful.
But here's my thoughts: If they are on hte glass they are probably fairly harmless even if you're seeing them on your corals. If they were a direct threat to your corals I'd expect to see them only on your corals. However, large and sudden unexplained changes in anything indicates a system that is not as "stable" as it could be and I would be running tests to make sure parameters haven't altered much and keeping a close eye on mys sytem for a while and might even siphon them out with a small water change.