With a sealed battery and a modern charger it may often not be a problem, but the possibility of danger exists.
Modern sealed batteries are generally not rated to withstand substantial pressure. If "gassing" occurs due to overcharging they will almost certainly "vent".
This raises both the Hydrogen gas and acid hazards mentioned by others.
It happens! - ask me how I know:
I can confirm from painful & health affecting (long long ago) personal experience that sleeping in a room where a lead acid battery was charging caused severe inflammation of my mouth and throat - and probably to some extent my lung "input" area. This was extremely painful and took weeks to heal.
In my case the battery probably "gassed" badly during charging. This should not happen with a properly designed and correctly functioning charger. The result was that sulphuric acid was transferred from battery to air in a manner that allowed it to cause me harm. The room was about 3m x 3m and may have been relatively unventilated.
So, while it MAY not cause problems on many occasions, I can attest that the possibility definitely exists.
As Dmitry notes, you'd not expect sulphuric acid vapour alone to cause problems. But, by experience shows that it can. The mechanism by is uncertain. eg generated Hydrogen may have assisted vapourisation of liquid droplets in excess of the vapour pressure. Regardless of HOW it happens, it can.
If a charger is faulty and keeps charging when the battery is at full capacity - or if the battery has a shorted or heavily sulphated cell so that the overall battery will not reach full voltage, then charging can continue indefinitely. This will generate copious Hydrogen (as mentioned elsewhere).
The "used top be sealed" battery shown below exploded extremely violently under these circumstances due to internal Hydrogen gas buildup.
I saw this after the event but was not present at the time. I was told that the explosion was "very impressive".
Probably didn't look quite like this photo of me (really).
Hydrogen flames tend to be clear. Battery acid mixed with the Hydrogen could be expected to add some colouration.
This photo shows acetylene burning "oxygen rich".
DO NOT try this at home.