In 1954 Hans Rademacher gave a series of lectures in which he described his reasoning step by step, see Lectures on Analytic Number TheoryLectures on Analytic Number Theory, page 113 and following. This should give some insight into his creative process, of which he himself says: "The path [of integration] is complicated and was not not invented in one sitting."
Deleted strange character, repeated four times, before the phrase "not invented". Removed HTML.