Is it safe to sleep in the same room with a car battery?
With any larger battery with significant potential energy, exceeding the discharge rate, over charging, charging when at end of life, or physical abuse can lead to explosions, unexpected venting of acid, or overheating that can cause a fire. The battery should be in a properly vented, protective case that safeguards the terminals and there should be an appropriately sized fuse on one or both terminals of the battery where the load and charger connects.

If the battery is simply being stored (not charged or discharged) in the room and it is in a proper protective case, then it is perfectly safe.

If the battery is the type with removable caps, then care must be taken during charging due to the release of hydrogen gas during the charging process. Of course the acid in the battery is quite corrosive should the battery be tipped or if the case becomes damaged.

If the battery is an AGM (absorbtive glass mat) or gel cell type then there is no danger of off-gassing during normal operation. These styles of batteries will not leak if tipped - many are rated to work even when placed on their side or inverted.