I know this is probably a common topic. For me, I’m not sure if it’s a “trope” or just totally misinformed writing, but it’s how many authors approach alcoholism. Some examples are Girl on the Train and The House Across the Lake, among HUNDREDS. If anyone else here has struggled with alcoholism, you know it’s not just "i woke up after downing an entire bottle of whiskey but was able to shower, down a cup of coffee, and solve a murder. "
Sometimes I feel like I have the coolest ideas in dreams (though sometimes they only seem cool until I’m awake). Wish I could harness that brainpower without being asleep.
There’s a something called hypnagogia that is close to what you are describing.
The trick is keeping yourself from falling asleep after it happens. Salvador Dalí apparently did this.