Hilarious. The strange thing to me is, while you are in this state, the connection makes perfect sense. It's only when you snap out does it become inconsistent. Maybe it has to do with certain portions of the brain relaxing before others.
In contrast, when I'm falling asleep (and I assumed this was more what the parent was talking about) I'll suddenly realize that there have been one or several strands of nonsense running in my head for what seems like some time. Sometimes the strands seemed like reasonable trains of thought until I attended to them, sometimes they're just imagined dialog of other people (experienced as mentally overheard instead of consciously imagined) or something else.
But to become aware of them (and to be aware of them as nonsense) in the falling asleep case isn't to snap out of the state. The state continues often until I'm asleep, and a kind of metacognition appears over it with the realization that my thoughts don't make any sense and drawing the conclusion that I'm in the process of falling asleep. Except the original state is probably better described as semi- or sub-cognition.
It's nice to know a couple other people have similar experiences.
I'm not aware of any connection in myself between throwing an exception when almost asleep and being mindful of my emotional state and its effects while awake. (Except perhaps the correlation that I'm more mindful generally now than a few years ago, and the going-to-sleep thing might be a last-couple-years phenomenon. I don't remember it for sure before then.)
I do find that using programming metaphors (e.g., throwing an exception) for my mental processes is almost always misleading.
Also, I don't think it is just nonsense. These strange thoughts seem to have two levels to them. The more syntactic level, i.e. being part of a video game and fighting giants doesn't make any sense. But, it is the intuitive meaning behind these images that does make sense.
So, my theory is that I'm not necessarily thinking nonsense, but thinking on a different level. A level switch causes that meta-cognition of "nonsense" to occur.
This is similar to reading good literature. Often, great books make use of complex imagery that doesn't make much literal sense. But, focussing on the intuitive impressions that the images bring seems to convey some kind of deeper meaning.
I would bet that someone who didn't dream would do substantially worse on cognitive tests of all sorts.
(It takes a little practice.)
A little glossolalia will fork your language processing and symbolic thought, and help turn the volume down on the pesky internal monologue.
But to do it, you have to reinforce a little the nonsensical stuff for a while (and at speed). This semi-conscious state in which there are inconsistencies is "pre"-dream, in which almost everything is quite nonsensical, but it kind of "makes sense", so it gets reinforced a bit. The interesting thing is that this is done in parallel, so what you remember about a dream is like a small part of what your cortex was "thinking", a massive recombination of ideas.
Well, I could go on and on with my speculations... ;)
I'd love to be able to do this more when fully awake. Sometimes I can -- I'll realize the influence of my emotions on my thoughts when considering them. But not as often as I'd like.
I liken it to a kind of metacognitive exception-throwing. Have you guys found ways to put a few more asserts() in your thought process?