Mosfet to save power
I suggest using high-side switches rather than a low-side switch. 

Edit: One high side switch for each power supply.

Something like this:  (Edit: x2) 



It needs a base resistor for the BJT or use a logic-level MOSFET. R1 could be something like 10K and the base resistor 20K or so. The p-channel MOSFET should be logic level for your conditions. You can find dual p/n channel units in an SO8 that can handle some amperes. 

The problem with switching the ground connection (low side switch) is that there are two power supplies on the chip and the inputs will end up biased at some voltage above ground, which may draw unnecessary current and/or be bad for your micro. 

You still have to bring the outputs of your micro low or you will drive unnecessary current into the L298 inputs.