I couldn't find a direct toggle. Try this.
In CV you should see a Metronome bus.
Right click the [M]ute button.
Click 'Remote Control ...'
Click [Learn]
Stomp the button you want to control this. Note that controller value display does NOT immediately update
Click [Learn] again to see the captured value
Now during recording, you can toggle mute for the metronome with your MIDI pedal.