You're right about the environment. Creativity often isn't well-aligned with traditional learning patterns.
At least that is how it works for me most of the time. Although I guess I do take direct inspiration from the things themselves sometimes.
When I solve problems like this I typically get a vague sort of vision of what the final solution is going to look like in my head (possibly the innate part). Then I take all the little things I know about and slowly build up something that will perform the action I want. After which it becomes a task of optimization by combining and changing things until the final solution falls out (the experience part). When you have 2 or 3 people working on the same problem using this process some really special things often come out of it.