It happens to me most of the time! I usually get great lines while I'm in the shower or bed. Funny how those are the best ones you've written if only you'd actually written them down?
I started taking a pen and pad to bed but the wife complained about the light coming on all the time and waking her up😴
Now I just write them down when I remember, which is why I have a backlog or my songs sound so disjointed. Never mind it's better to have a load that you can pick the best bits from 😇