Ideas can be like living life forms. They tend to show their presence during the most mundane times—in the shower, while cooking dinner, while working. This seems to be out of one's own control. There is no rhyme or reason as to where these ideas come from. Are they part of some otherworldly being? Or just random inspirations from the mind?
At other times, one tends to do something to simply generate ideas. When feeling a sense of writer's block, one may go on a run or walk to generate ideas. Or one may talk with a friend to get the creative wheel spinning.
Ideas can be created on purpose or by accident. There is no right or wrong way to generate ideas. It's just important that the mystic creative fire continues to burn.
Happy writing.
Rick