In 1932, American psychologist Walter Pitkin published the book Life Begins at Forty and since then, the phrase has become common.
In the 19th century, German philosopher Arthur Schopenhauer had also written something close to that saying, "The first forty years of life give us the text; the next thirty supply the commentary."