However, even among stimulants, there are chemical differences between them, and they might act differently in the body. Also, coffee does contain a lot of other chemicals alongside the caffeine. Biology is never simple!
However, you can, in my experience, enhance the creative/lateral-thinking benefits of sleep cycles by adding carefully-timed/dosed caffeine as a stimulant. The basic kinds of patterns I've found to work well go something like: Bang your head on a hard problem to at least partial mental exhaustion, then consume coffee and go take a short nap. The stimulant buzz will slow down the process of falling asleep from exhaustion, and that slowed-down timeline gives you more minutes in that halfway-asleep state with your mind abuzz in lateral creative connections mode. Then you eventually make it into sleep and wake up later refreshed with new ideas.
"This is my brothers Ritalin, It's great for staying up and studying just don't try to write an English paper on it"
Not that you should strive for that scenario though.