But if it's important enough you'll remember or it'll come back to you next time you shower. Or not. Either way is fine.
Should true inspiration strike while soaking in the bath, it is traditional to run through town shouting "Eureka!"
For lesser ideas, a waterproof (usually non-electronic) notepad and pencil may suffice.
Learning to just sit still and let the universe (including whatever your mind does) flow around you... It makes a huge difference in mental health. It really cannot be overstated how beneficial for humans it is to just have downtime and do literally nothing but breathing.
But I know it's hard. Our whole culture is predicated upon being busy. But we can just put everything down and be empty for a bit every once in a while and it is so beneficial.
What I ended up with is literally a time of day where I "sit with myself" and just think about things. I just sit down for some minutes and try to get my bearings on where I am in life right now. Also, I eliminated a lot of background noise and music - I often do menial things without any other distractions for example. Good opportunities to think about something deep.