It's safe to charge a lawn mower battery overnight.
However if you do charge the lawn mower battery overnight be sure to put the battery charger on the lowest trickle charge setting.
Leaving the battery charger on the higher setting can cause the battery to overcharge which kills the battery.
You can overcharge a lawn mower battery if you use a battery charger.
Leaving a battery charger on the lawn mower battery for too long can cause the battery to overcharge and cause the battery to go bad.
A lawn mower battery should fully charge with a battery charger within a few hours to 8 hours at most.
You should not leave a battery charger on the lawn mower battery for longer than 8 hours because if you do the battery could overcharge and battery acid could leak out.
That happened to me when I had put the battery charger on the battery for the lawn mower and then I went in, had dinner, took a shower and went to bed.
The next morning I remembered I had left the battery charger on the battery and it destroyed the battery.