A baby laughing in their sleep can be a few different things.
A baby smiling in their sleep could be just due to gas build up and the laughing and smiling could also be because the baby is dreaming and processing things they saw during the day.
When a baby has gas and is relieved of that gas their facial expressions can look like they're smiling or laughing.
So it could be gas or could be that the baby is dreaming about something during the night and is smiling and laughing because of the dream.