Origin of "That's what she said"?
Solution 1:
I reckon its origin is the phrase "As the actress said to the bishop". This means:
used to highlight a sexual ambiguity in an innocent remark
This was then possibly shortened to "That's what she said".:
"Said the actress to the bishop", sometimes "as the actress said to the bishop", or simply "that's what she said..."
Wayne's World was the first documented recording of the usage of "That's what she said,", but I reckon "As the actress said to the bishop" influenced it a lot.
Solution 2:
That's what she said seems to be a simplification of the phrase said the actress to the bishop, used with similar implications. The phrase dates back to at least 1928, according to the Wikipedia article, as it was a common saying of the character Simon Templar of "The Saint" mystery novels, the first of which was published in that year.