"Near-death experiences: Heaven can wait" article from The Independent goes into mostly what physiologists think causes a near-death experience.
Here's a thought: maybe when the soul is separating from the body, it causes those things to happen in the brain? And also, when a high percentage of people experience joy and peace, maybe we should just see it for the gift that is, whether it is physiological or spiritual in nature?
It's interesting that they mention an out-of-body experience as something separate from a near-death experience. It's true when you think about it, though I always thought an out-of-body experience was a given for a near-death experience. If I ever happen to be in a situation where I have a near-death experience, I wonder if the out-of-body experience will be more likely for me, as I have had an out-of-body experience. Mine was interesting in the fact that my eyes remained closed throughout the whole experience, though I could feel the carpet beneath my feet. It was not sleepwalking, though, as the layout of my house was not right during the experience.