When inspiration hits you out of the blue, call it an epiphany.
In the Christian tradition, Epiphany (ə-PIF-ə-nee) is a festival celebrating Christ's appearance to the Gentiles, observed every year on January 6. From the Christian sense we get an additional religious sense, "the appearance of a god or deity" and the more common modern usage, a noun meaning "a sudden revelation." There's nothing religious about most epiphanies these days — your "Eureka!" moment could come when you realize that you're in the wrong line of work and you need to quit your job to join the circus.