When a person dies, they have 7 minutes of brain activity left. It's the mind playing back the person memories in a dream sequence.