I'm not sure, wouldn't the stingrays would simply dig the worms out of the sand?
Now it's certainly possible to keep blackworms in aquaria and have a population going. Ideally, your substrate would be layered with some sort of soil based substrate capped with a decently deep layer of sand. Could easily boil some oak leaves for about 20 minutes to leech out most of the tannins and get them to sink and toss them ontop of the sand to add a natural look and provide a starting point of detritus/mulm to feed the blackworms. They'll also scavenge leftovers from the inhabitants but I honestly think the rays will just dig them out of the sand bed and make a mess of the tank in the process. I think establishing a worm bed is more suited to a lightly stocked planted tank where dead leaves/leftover fish food provide a constant source of nourishment for the worms and the small fish living in there will keep the population in check but not completely decimate them.
You could also set up a planted refugium attached to the main tank with worms, scuds, shrimp, etc. and have both the benefits of better water quality via the plants and a culture of live food that you can either feed manually or wait for the odd individual to slip through the outflow into the ray tank.