Good idea. But as was previously suggested be sure and mark any wires you take loose as to polarity along with the terminal they came from. Then be sure you get ALL of them connected back . Don't leave any loosies hanging over behind the batteries where you can't see them.
The very most appropriate fix here is to totally remove the batteries so that the spillage into the battery trays can be neutralized and cleaned up. Otherwise the crud and corrosion will be back to haunt you in a short time. This also allows you to clean the sides and bottoms of the batteries so corrosives are not transferred back into a clean box or boxes. And by the way; While you have empty battery boxes (trays) it would be a good time to wire brush them real good and spray them with an appropriate Rustoleum or like paint. And don't forget to lube the tray runners with a good oil. Not a non lube like WD40.