According to this theory, the brainstem produces electrical signals that activate various parts of the cerebral cortex, which is responsible for higher-level cognitive functions such as thought, perception, and memory. These signals are then interpreted by the cortex into the content of our dreams.
The activation-synthesis theory is one of the leading explanations for why we dream, although other theories also exist. Some researchers believe that dreams are a way for the brain to process information and emotions from the day, while others believe that dreams are a way for the brain to communicate with the subconscious mind.