According to studies, sleep talking also know Somniloquy could be caused some factors. They could include, stress and anxiety, fever, medication, substance abuse and could be as a result of other parasomnia(abnormal behavior while sleeping) like sleep walking. Sleep talking is not known to be a medical condition and it is very common especially in children.
You can see a sleep specialist for it especially if it is something you developed in adulthood. You should also avoid stress and anxiety, drinking alcohol,eating very late at night and be sure to get enough sleep. Some specialist suggest you have a sleep diary That records your pattern before and after sleep. This can help to rule out some factors that could cause sleep talking.