Are you refering to hypnogogia? That usually happens right before falling asleep.
Maybe if one is to stay conscious during hypnogogia for longer than I ever have they would experience a similar thing? There just always seems to be some bias in hypnagogia steered by and experienced by my consciousness in first person. In the other experience it is really more like I am an outside observer.
This is like a lucid dream but there is no narrative or control over what is happening -- only awareness. It is really most like being in the center of a river of thoughts, briefly experiencing them as they rush by.