This is a topic that I have researched about (on the internet) in the past. I disagree that it is a brain issue [either from dying or oxygen depravity]. Why I state that it is not in our head is because there have been numerous examples of people knowing what others were doing around or near them while they were unconscious or otherwise not privy to someone else's conversations or situations. Yet many of these people wake up knowing things that they could not have known.
I have read of people having these near death experiences being in hell or heaven or just with loved ones. The other thing that I have found is that many also state that their experience was very Christian oriented. Meaning that they were aware of a savior that most agreed [no matter what their faith] that this savior was a Christ like figure.
That said, I think it is entirely possible that many of these people are full of it. Anyone could say "I saw a light and felt loved and etcetc'
Just my humble opinion