I think a couple of things contributed to this weird state that I've never been able to reproduce again:
* This happened soon after my family relocated to the other side of the world and my sleep schedule was still a bit messed up.
* I was a teenager and at the time was going through a phase of interest in lucid dreaming, so I'd been keeping a dream journal and got to the point where I had really good dream recall. I think it also helped me stay conscious closer to the boundary between sleep and wakefulness (eg as opposed to just blacking out into sleep I would remain conscious during more of that transition process)
* I had been practising taking mid-day naps because I read that those might be the best time to induce a lucid dream. I wasn't trying to do this when this happened, but it _was_ somewhere around mid-day and I _was_ in bed, maybe my body just decided it was time for a nap and entered that state between sleep and wakefulness.
I wish I could make it happen again, but I've never been successful with inducing this.