Mazda stuck the battery in the boot in the MX5 to even out the weight distribution.
I'd like to think they know a thing or two about auto electrics
It'd be best to have it as close as possible to the starter motor to avoid losing a load of volts accross the wire, but if you've got a decent chunky cable it shouldn't matter too much.