Occasionally I'd realize I was saying something ridiculous and catch myself. Most times, though, they'd ask me for clarification about whatever crazy-sounding thing I said and I'd snap back to wakefulness (briefly). I wish I had recordings of some of those things I said. They left my mind almost immediately (to the point that I couldn't respond to questions asked directly after whatever I'd said). It would be entertaining to know what I was saying. (I didn't ask friends at the time and, at >30 years ago, I doubt any of them remember.)
I read to my daughter before bed. She drifts off sometimes when I'm reading "boring" stuff (at her request) and says fun things. I keep notes and ask her about it later. I enjoy the window into her mind.
Put a piece of paper under the hand with a pencil, write down thoughts until you're gone, read in the morning - profit
Also, sometimes when I wake up I have a few minutes where nonsense ideas seem perfectly reasonable. Or it will feel like a complete loss of inhabitation.