Brain implants have revealed that we replay conscious experiences while we sleep, with the same patterns of neurons firing during sleep as in waking life
Source:
https://www.newscientist.com/article/2242623-we-really-do-relive-experiences-from-waking-life-when-we-sleep/?utm_campaign=RSS%7CNSNS&utm_source=NSNS&utm_medium=RSS&utm_content=home