Depends on the battery type what bad can happen, but generally that doesn't include harm to the battery -- it includes danger of acid leaks.
Sealed, maintenance-free doesn't mean anything. It just means you can't add water (or acid -- but usually you don't have to add acid, just deionized water). But there are many types of battery where you can't add water.
Permanently sealed liquid acid batteries with no caps, you can't add water.
Gel batteries, you can't add water.
AGM batteries, you can't add water.
Note that every single one of these battery types has to have some mechanism of venting hydrogen gases. So they aren't truly sealed, just they have a valve which attempts to keep acid in but let hydrogen gas out. I wouldn't trust such a valve to keep liquid acid fully in if the battery is inverted.
The difference between these batteries is:
- In permanently sealed liquid acid batteries, the acid is liquid. It will flow out when inverted.
- In gel batteries, the acid is gel. It won't flow at all. You can invert the battery and it stays as gel. But charging when inverted, it's possible some of that gel is pushed out if hydrogen gas is created and builds up pressure.
- In AGM batteries, the (liquid) acid is absorbed in a glass mat. It will stay absorbed, but again if you recharge when inverted, and hydrogen gas builds up, it's possible you will get some small amount of acid leakage.
Usually gel batteries aren't used on cars. So it's usually a choice between liquid acid and AGM.
If your battery is liquid acid type, even if sealed and maintenance-free, keep it upright all of the time. Don't put it on its side or you may get leaked acid.
AGM, you can perfectly well put these on the side. Usually charging when completely inverted though isn't permitted.
If you got acid leaks, neutralize it with sodium bicarbonate or sodium carbonate (baking soda / soda). It may be useful to wash the area where the battery was carefully with a solution of soda in water even if you don't see any leaked acid.