My boat is 19 years old and I don't have my batteries in boxes. No problems at all.
I do have my batteries in trays and have straps attached to keep them from moving or bouncing around.