A lot of my ideas for from conversations with other developers and founders.
Listening to podcasts, reading, and thinking also bring me a lot of ideas. The most important thing in my mind is to have a backlog where you can keep ideas. It's not often that free time and inspiration come at the same time for me.