Roald Dahl got motivation for his books from his children and frequently made up bedtime stories for them. These stories mostly became published books. 1st book James & the Giant Peach, for example, began as a bedtime story. Dahl's books were mostly influenced by his family.