If they are really small, I would just leave them alone since they eat detritus. However, if you really want to get rid of them from your LR, you can place them in RO/DI water and they will eventually crawl out. I usually place any LR in RO/DI water before introducing it to my reef and any bristle worms, brittle stars etc. will crawl out from the LR. Another way is to setup bristle worm traps, but I think traps are a pain.