H-Bridge freewheeling current
Fundamental to this type of diode protection is a large capacitor that can soak up the energy from the motors, via the diodes when all transistors or switched off. Going deeper, you can also use a high power zener diode across the rails and, going deeper still you can switch a resistor load directly across the power supply lines to dissipate the excess energy for the duration expected.

You can also protect your supply with a diode so that excessive voltages don't  force current into the power supply.

The method you suggest will still attempt to raise the supply voltage so this might still cause problems on a sensitive power supply.

If you can provide a link to the motor it may be possible to estimate energy stored but, in most cases it will depend on the mechanical load free wheeling the armature and causing it to act like a generator.