I always keep an open mind. So usually I write whenever I feel like...best is while listening to some music in the background.
Then I can come across a nice beat and do adjustments to lyrics on the go. Speaking for myself if the lyrics don't click straight away like 4-5 lines popping up naturally, I don't try too hard even if it's a hot beat.