I'm a firm believer in NDE's and Out of Body situations... I actually teach a workshop on Astral Travel but one of the things I point out to every student is that the starting point to it all is MENTAL PROJECTION it has nothing to do with silver chords, spirituality, mysticism, etc. it's simply allowing your mind to drift and move along a focused sense of journey, literally letting your own imagination open certain doors of insight to you... very much a waking type of dream.
True Astral Projection (a.k.a. bi-location, clairvoyance), such as one comes to know at death or near death in limited cases, requires many influences. When done consciously it only happens after years of discipline and even then, the eager will frequently delude themselves into believing something happened when in truth, it didn't.
Yes, genuine Astral can happen when one sleeps. It's quite common as young one come into puberty and seniors head into their more declining years, but it's rather rare in the years between the two.
When it comes to NDE type accounts there is a huge truth to the fact that it's mental hallucination created by certain bio-electrical discharges. This gives us the tunnel effect and can trigger our memories so that our life flashes before our eyes and/or we find long lost loved ones there at the end of the tunnel, to greet us.
We have to remember that most projection type work has ALWAYS involved the use of sedative and hallucinogenic herb compounds, be it in the form of "tea" or smoke. The other common ritual arrangement included sleep & food deprivation (fasting) which likewise trigger biological "messengers" so to speak, that make us more susceptible to a hallucination based experience. These religious rites keeping us focused on a given purpose behind the journey so that we can personalize it and attach it to something etheric and mystical -- pure psychology!
This does not mean that your experience has no value, only that there is an alternative understanding behind the ritual and why it is designed as it is and why, psychologically, it will impact us in manner that seems to be a "Religious Experience"
The NDE scenarios in which Astral happens and the patient is looking down onto events in their room, home, etc. IS NOT the same thing as those previously mentioned... it is the more mystical exception in that your "consciousness" or "soul" has left the body in a quite literal sense. The shamanic theory being bi-fold; firstly, the spirit must experience certain things in a certain way in order to grow; secondly, you need to out of you physical body so that your consciousness doesn't interfere with the physics tied to the work doctors or EMTs, etc. are doing... you must be an observer rather than a participant. Again, there is a reason for this when it comes to the metaphysics to it all, but it is important that you understand how this is not the same or even related to the tunnel of light, etc. they are quite different things...
One Last Note... I've always found it interesting how some folks don't encounter this famed tunnel & light but rather some dark horrors. Typically, these are individuals with dark secrets in life and possibly even "negative" life-styles in which they inflict cruelty onto others, deny their 'true-self', etc. Because of the osmosis factor, these people have been pre-conditioned to believe that there might be a hell to go to upon death and so when they have an NDE, that's where they go... about two weeks after the NDE however, you'll find them in church