Cellphones are perfect for this. For maximum effect, hold it above your face while falling asleep.
(Only semi-joking, I've done this multiple times.)
(Only semi-joking, I've done this multiple times.)
Any friction between the time I have an idea and the moment I can capture it increases the risk I will forget it before I have time to write it down.
It's better to let your mind wander to maximize the compounding effect between the ideas, rather than to fret about memorializing every vainly appealing thought (and btw, I bet if you did that while sober, it would look just as ridiculous when reading it the next day).
Just let it flow, man. You'll remember the good stuff.