Looks like a type of flatworm, but these aren’t an issue. They’re detritivores, and high populations simply mean you’re overfeeding. A couple water changes and less feeding will have them gone in less than a week
I have been looking to obtain a culture of those detritus worms with which to establish a population for the upkeep of a Mandarin. If there are a lot of them in your sand bed, would you be willing to sell me a couple of handfuls of the sand ? I can cover the shipping cost.