In principle, VRLA AGM and Gel batteries may be mounted in any position (except upside down).
This is thanks to the leak-proof nature of such batteries.
By design, the position in which the batteries are mounted has no effect on their service life.
The same applies to lithium batteries.
Wet / NiCad batteries should be mounted upright at all times, otherwise there is a risk of battery acid leakage.

This month was THE boat reveal of TU Delft’s Hydro Motion Team and we are proud battery sponsors there. See below the boat the students designed themselves, which contains the battery.