I never really succeeded, but I had a few, very short OOBEs. They only lasted a few seconds because I always got too excited the moment I realized it finally happened, and so I immediately woke up.
When you say this happens randomly when you are falling asleep, then this sounds to me a bit like the start of an OOBE.
Here is what I did and felt when I tried to experience an OOBE: lay down comfortably and try to let your body fall asleep. Take deep breaths, observe your body and look out for certain sensations, try to focus on the here and now so that the mind stays awake. Most of the time I just fell asleep and woke up in the morning, without remembering anything.
But if you stay focused enough, you may start to feel and hear some kind of vibrations in your body, which may intensify if you stay focused. This phase is usually referred to as the "separation of the mind from the body". Once the vibrations are over, and you stay focused, you may start to get the feeling of "floating" and other strange body sensations. Sometimes it felt like my feet started to float, then my legs, and finally my whole body. If you are really good at this then you can try to "open" your eyes and look around. It may be really dark at first, but with enough focus you can literally say "let there be light".
I was only once at this stage, my body started to float, and I "opened" my eyes after a while when I suddenly "saw" the ceiling right in front of my face. I got so excited that I immediately got "sucked" back into my body, and then I woke up.
Nothing really happens in the physical world, an observer will see you falling asleep, but the whole experience always feels so damn real, the beginning is almost always the same and many people can confirm this. It's incredible and fascinating. Unfortunately I never got really good at this and I lost motivation. I was around 17-18 back then and seeking for the meaning of life.
Another fascinating part is that there is no real scientific explanation for this phenomenon. Of course it's usually labeled as some kind of dream state, or just a chemical reaction in our brains.
It depends on who you ask, but for some people this is esoteric nonsense and just simple dreams, for others this is the gateway to a another reality/dimension/quantum world. Personally I have no idea and never figured it out, and I don't care anymore. I got older and I have other problems now, like paying my bills. But it's still fascinating stuff and I like to think back about it every now and then. The internet is full of information and reports about this topic, some serious, some less serious.
Anyway, thanks for making me remember about all of this, after a very long time. It was a fun experience.