In her book, The Art of Fiction: A Guide for Writers and Readers, Ayn Rand defines inspiration in the following way:
What is colloquially called “inspiration”—namely, that you write without full knowledge of why you write as you do, yet it comes out well—is actually the subconscious summing-up of the premises and intentions you have set for yourself. All writers have to rely on inspiration. But you have to know where it comes from, why it happens, and how to make it happen to you. — Ayn Rand
Inspiration that we get when working on any problem, not just writing, comes from the “premises and intentions” we have previously stored away in our memory. Let me use a sports example to illustrate this idea. During his career, Michael Jordan made some truly inspired moves to help his team win games. We watch in awe as Jordan and other basketball players do the unimaginable and we wonder how they could even think to do it. They do not think about it. They have no way of knowing in advance how things will go during the game. They must rely on inspiration to perform as they do. It turns out well because they have prepared themselves beforehand so that they can make inspired moves in the game. They can make those moves because they spent the time to store away in their memory the premises of movement and intentions of getting more points and blocking the opponent from getting points.
Let us step back and look at something that comes natural to most of us: walking. We walk without thinking. We can navigate around a room thinking of what we plan to do when we get to our destination, never thinking at all about the steps along the way. Our foot avoids stumbling over a book left on the floor without more than a glancing thought when we see it out of the corner of our eye. How do we do that? We have stored away in our body all the information necessary for us to use to avoid or overcome physical challenges in the room. Yet we cannot explain how we do it. While you walk across the room, somebody tosses you a ball and you catch it before realizing what has happened. Try tossing a ball at a two year-old and you will realize the inspiration you use to catch the ball. Your past experiences prepared you for that moment of inspiration.
If you want to ensure that inspiration comes when you need it, you need get away from the idea that inspiration comes from some magical source that you have no control over. You do have control over it. The inspiration comes from inside you. If you find that you cannot come up with a solution to your problem, it means that you do not yet have a good background. What do you do in that situation? You look at what others have done. You review past problems you have worked on and look for similarities. You discuss your problem with a co-worker or manager. After some time, a light suddenly comes on in your head, perhaps in the wee hours of the morning, and you get inspired with a solution.
Where did that come from? Most people cannot explain it. It came from somewhere, though; it came from your intense activities to find a solution. If you understand this, you will realize that you do not have to wait until you have another problem to work on. You can get a head start on the next problem by simply brushing up on your current skills and studying everything you can find in your area of work. Engage yourself in meetings. Talk about your work with others. Study and exercise your brain and body to solve many different kinds of problems. Take refresher classes in your discipline. Get the basics down. Repeat them daily. Practice. Inspiration comes to those who prepare themselves.