What is it called when images swirl around in your head...

…right before sleep?

Never mind, I found it.

Hypnagogic Imagery.

Posting the answer will prevent future posts along the same lines. Or maybe I’m being idealistic.