Sounds like HH(Hypnagogic Hallucinations). It can happen when falling asleep and usually happens when in SP but sometimes they will happen with no SP present.

You were almost in a WILD. Maybe you should look at the WILD tutorials and see if you can use it to have a lucid dream!