I would love to know what goes on in the brain during sleep that enables this phenomenon.

I'll explain it to you one day.