Sleep talking is a sleep disorder that involves unconscious talking during sleep. Sleep talking isn't the same for everyone, with some mumbling and talking gibberish, to others who may have complex and coherent speech. Some nocturnal sleep talkers may sound completely different to their normal everyday speech.
Anyone can experience sleep talking, however it can be genetic and occurs more often in males and children. There are many triggers that may lead to night chatter including, over tiredness, alcohol, stress and depression.
Sleep talking can happen at any time during the night and during any stage of sleep. In the earlier part of the night, people tend to be more in the deeper stages of sleep (Stage 3/4) and sleep talking may sound more like gibberish or mumbling at that point. As the night progresses, sleep becomes lighter (REM sleep and Stages 1 and 2) and may be more understandable to a bed partner.
Whilst sleep talking is not physically harmful, it can be embarrassing for the talker, and can be an irritation for a bed partner. For most, sleep talking isn't a constant problem, but if it does become a regular issue then it may be worth consulting a medical professional so that any other underlying medical problem can be eased. Following a good sleep routine (e.g. keeping a regular bed and wake time, obtaining adequate sleep every night, avoiding alcohol and tobacco at night, avoiding caffeine from the afternoon onwards) and minimising stress can be helpful in reducing the likelihood of sleep talking events.
Source - National Sleep Foundation https://sleepfoundation.org/