Could be spaghetti worms. Not a big deal as they can be beneficial in smaller numbers.
Best way to keep any of these or flatworms in check is to reduce your detritus.
Chart/record your feedings to watch them multiply and reduce your feedings, or more sand cleaning -- or don't worry about them unless they invade more
They are present in many reefs and don't pose a problem.
Allow them to reside as they help with detritus cleaning.