I don't like that feature. Makes the boss ridiculously easy / cheesy to kill. I doubt that they would make this part of the level design, especially for one of the last bosses in the (light world) game.
I doubt this was intentional, but on the right side, there's just enough space to get between the two saws near the middle of the screen with a hop off the conveyor belt. Once there, you only have to dodge the little maggots coming at your feet and it's guaranteed that eventually the worms will suicide into the saws. Easy win. (discovered this on accident, was surprised that I had survived)