I don't believe in the sort of "Eureka!" moment idea. I think it's a myth. I'm very suspicious that actually Archimedes had been thinking about that problem for a long time.