You get ideas from daydreaming. You get ideas from being bored. You get ideas all the time. The only difference between writers and other people is we notice when we're doing it.
I was sued by a woman who claimed that she became pregnant because she watched me on television and I bent her contraceptive coil.