Something like that has happened to me during sleep before. One time when I was younger and I was really sick for a week, I had terrible, horrifying nightmares every night of a surreal sort that had to do with infinity and some kind of universe-ending black pillar of infinity. There was also some sleep-walking involved. One time I thought that I had flown out of my window and fallen to my death, but then I was awake and I went to the bathroom, but I was crying because I knew that I was going to go right back in time to die. I would actually understand them perfectly during the night, but I couldn't remember what I understood later. They recurred on two later occassions, and after the last I thought that the next time I should write it down, but it never happened again.
The only time I've experienced something like that during the day would be when I would smoke salvia. But then it's enjoyable instead of terrifying!