I believe you are fine. Think they are detritus white worms. Another part of the ecosystem. They can get out of control. Mainly from lack of water change and filtration. Also over feeding or it settling. The amount you have in your tank all depends on those things. It's like having bristle worms. You don't need to find a treatment to kill them off. Just keep them within reason. If you want to try and kill them off. Worry about ammonia spike from die off, because you really don't know how many you have lingering around in your sand bed.