1) an increasing love for JavaScript
2) a desire to build really fast web apps
3) I needed a tool for certain aspects of my freelance business
Given those, I decided to make an initial investment of 3 months and build an app to attack those head on. It's 2 years later and I still use the app every day; I even turned it into my company's first product.
So in my case, I fell upon my first idea after 7 years of professional experience. I didn't always love JavaScript, I didn't always care about how fast web apps are (or aren't), and it wasn't until I went freelance that I wanted to build the tool I mentioned.
An idea will come to you, but it may take time to fall upon a problem you decide is worthy to invest in. What I wouldn't do is pick any problem out of a hat and spend some of your life's hours on it. At a minimum, you should have some level of interest in the idea itself.