That last one just happened to me, over the weekend.
You never know what will trigger an idea, either. It could be something as innocuous as the position of a rock against a fencepost. Or more obvious, like a couple fighting for three hours next door, then going suspciously, and immediately, silent.
For me, it was the neighbour's garden. In their backyard, which faces my own, they have two decorative garden doors, right on the edge of their property. The way my backyard is laid out, these are in a small grotto, behind an aggressively overgrown dogwood bush, and under the low hanging, and far-reaching, boughs of a very old maple tree.
To look at it, it's a gorgeous sight. You're standing by a patch of daisies, looking into a shaded and secluded little clearing, and there are two doors, just standing there. There are no walls, no glass in the windows, and no handles on the doors.
I've been looking at them every day for a month, and nothing came of it. Saturday evening, though, I was outside playing with the Weenit, and it hit me like a bolt of lightning. The complete framework for a teenage-oriented fantasy novel. No meat to it, of course, that takes time, but the basis for it just fell into my brainmeats all at once.
I immediately wrote it down, of course, and will get to it when I can.
The point is, always be open to whatever comes into your head. You can't force an idea to come (unless you're Chuck Palahniuk, of course.... the man is a machine), which can be frustrating at times. But you can increase your chances by following those random thoughts that pop into your head. Follow them relentlessly, because you never know where they will take you.