The author of the novel got the inspiration from the following sources:
Walking is one of the best exercises to find inspiration. The author walked 400km from Teruel to Toledo to get inspiration to write the novel. In addition walking helps to:
1. Heal your physical and psychological bodies.
2. Connect with nature.
3. Connect with God.
Discipline is important to find inspiration. The experiences tells that if you work with focus during a pre-determined time schedule, the inspiration comes.
In other words, "get to work, and the inspiration comes". It normally does not happen the other way around "Get inspired and then get to work". The reason is that the inspiration often happens when the mind is set to work
Doing research on the creative project is a source of inspiration. See what other people did in the past, observe how things are done by experts, find your mentor and source of experience.