It was probably just irrational thoughts you experience when falling asleep asleep or Hypnogogia from sleep paralysis. If it was sleep paralysis, you would have felt bizarre feelings of vibrations, paralysis, even floating or falling. As for irrational thoughts, that seems more likely to me. As you fall asleep, your logic center begins to turn off and you start daydreaming about irrational things without your control, until a dream eventually forms. However, you can regain consciousness in this state and is another method to induce a lucid dream. Or it could of been just a lucid nightmare like Burke suggested . Hope this helped!