If the part wants to destroy the BBEG's base with some cheap ploy I say let them, and they can live with the consequences.
Besides which, what makes you think the players were the first one to think of the gambit? In any world with something like a
Rock to Mud available you can bet somebody is going to come up with a counter. Such as, say, rubble in a hollow space within the walls. Or, if you wish to be really cruel, grey ooze or green slime.
For real rottenness, turning a section of a wall to mud weakens the wall as a whole, so it collapses after a delay.
Then you have magical counters. Spells that ward against
Rock to Mud, or which amplify it; so that the area of effect includes where the characters are.
Paladin (hip deep in gooey mud): Have you thought about diluting the material component in some manner?
Don't forbid it outright, find some way to mak it a less than optimal solution within the world in question. One is being arbitrary, the other is being a rat bastard.