When I first found out about NDE's, it blew my mind too.
I understand that panpsychism (or some variant thereof) is the most obvious answer, but, being me, I speculated an even more mad answer
If the multiverse contains such huge numbers of versions of ourselves, my idea is that the experiences people have whilst dead are from another, compatible, version of themselves where they are NOT dead. Instead, they seem to be able to see the multiverse from the "outside". Still haven't figured out how that goes.
There's a small number of blind people who have had NDE’s. One of these was Vicki, who had been born blind, and had her NDE because of a severe car accident. She had a brief glimpse of the accident itself, and then she was above her body in the emergency room. Because she had never seen herself, she only recognised it was her body by her wedding ring and her hair. She then went on to meet dead relatives and friends, as in other NDE’s, but she could see them.
What intrigues me about this, is that when congenitally blind people have been given sight, (usually through cataract operations) they have had to spend time learning how to see, taking anywhere from a week to a few months - to tell, for example, that the cube they were seeing was the same as the cube they felt in their hand.
Vicki was scared by the fact she was suddenly seeing, but she didn’t need to learn how to do it. This implies to me that her consciousness was running on a version of herself that already knew how to see.
I realise this is even madder than the usual mad things, but I thought it might interest people.