in a tank housing those species worms probably arn't good. i have thousands of little white worms in my dart frog tanks, but they just eat them. with frogs that big they wouln't be able to eat them. i would just change the substrate and wash the tank out with 5% bleach solution if possible. if you are really worried you can use dry ice. take the frogs out and the dry ice will kill the worms but not plants. do more reserch before you attempt this though.