Are there any serious investigations of whether "mathematicians do their best work when they're young"? There is no shortage of anecdotes and conjectures on both sides of this widespread belief, but good supporting data either way is harder to find. Can anyone provide any references for serious (preferably academic rather than journalistic) research that actually crunched the data and produced interesting conclusions about whether this bit of folklore is reality-based?
I put "mathematicians do their best work when they're young" in quotes because this is clearly not a well-posed question--it is only intended to be shorthand for any of a number of questions on this topic.
Historical studies (Évariste Galois, etc.) are OK, but studies on people born after, say, 1950, would be of greater interest and relevance.
 A: If everybody assumes mathematicians to be "a different cup of tea" or that "they cook themselves apart from the rest of scientists" (or that they are not scientists at all, if you will), then I would have nothing to add to what has already been said. However, let us suppose for a moment that mathematics is comparable to any other scientific endeavor. Then we have this article of Packalen & Bhattacharya, 2015, "Age and the trying out of new ideas" (http://www.nber.org/papers/w20920.pdf) which I would say is closely related to your question. Not in the sense of bulk production, but in terms of originality, which in my humble opinion, it is also very, very important for mathematicians (perhaps even more than size of production). They studied biomedical articles since 1946, and one of the conclusions they arrive at, is that the best possible team in order to obtain an original paper, is a young scientist coupled with a "more experienced" one (read it as "older", maybe "much older").   
A: I hope it's OK to post an answer to my own question since it's community-wiki. Here are a couple of things I found down this rabbit-hole.
Dean Simonton at UC Davis has done some work claiming that there is a slow age-related decline in quality and quantity of creative output, but the relevant variable is career age, not biological age. He also makes it clear that although he believes there is a clear aggregate trend, the individual variability is much greater than the aggregate variability. Furthermore, he attributes the decline mostly to factors other than biological aging.
Simonton, D. K. (1997). Creative productivity: A predictive and explanatory model of career trajectories and landmarks. Psychological Review, 104, 66-89.
This paper is behind a subscription paywall (but there is a link below in the comments), so instead I'm posting this link to the PowerPoint (sorry) of his 2005 talk at the Max Planck International Research Network on Aging:
http://psychology.ucdavis.edu/Simonton/MxAgCrProd.ppt
I couldn't find a good sound bite from Simonton's paper. Here is a quote from Arne Dietrich's 2004 paper The cognitive neuroscience of creativity:

Simonton (1997) has convincingly demonstrated that
  “creative productivity is a function of career age, not
  chronological age” (p. 70). Although career age and
  chronological age are highly correlated, latecomers to a
  discipline show the same career trajectories and landmarks,
  as well as conformity to the 10-year rule (Simonton,
  1997, 2003). For instance, mathematicians peak on
  average at 26.5 years of career age, while historians peak
  at 38.5 (Simonton, 1997). Because prefrontal-dependent
  mental functions do not significantly decline until old
  age, the distinction between chronological and career age
  can be accommodated as long as the creator’s career onset
  is not at an advanced chronological age. 

A: As I originally said as a comment, the following paper provides perhaps one attempt at approaching a similar question. Namely the authors explore what effect winning the Fields medal has on mathematicians productivity. To do this they examine publication and citation rates of a select group of mathematicians over time. The authors' note, "It turns out that Fields medalists are not only publishing fewer papers in the post-medal period, and that those papers are relatively less important, but they are also accepting fewer mentees under their wing."
"Prizes and Productivity: How Winning the Fields Medal Affects Scientific Output"
George J. Borjas and Kirk B. Doran
A: These two studies arrive at what seems to be a more sensible conclusion:
Age and Scientific Performance, Stephen Cole (1976).

The long-standing belief that age is negatively associated with scientific productivity and creativity is shown to be based upon incorrect
  analysis of data. Analysis of data from a cross-section of academic
  scientists in six different fields indicates that age has a slight
  curvilinear relationship with both quality and quantity of scientific
  output. These results are supported by an analysis of a cohort of
  mathematicians who received their Ph.D.'s between 1947 and 1950.
  There was no decline in the quality of work produced by these
  mathematicians as they progressed through their careers.

Age and Achievement in Mathematics: A Case-Study in the Sociology of Science, Nancy Stern (1978).

The claim that younger mathematicians (whether for physiological or
  sociological reasons) are more apt to create important work is
  unsubstantiated... I have found no clear relationship between age and
  achievement in mathematics.

For anecdotes and "advice to aging mathematicians", I might recommend Mathematical menopause, or, a young man's game?, by Reuben Hersh (The Mathematical Intelligencer, 2001).

Until we find a consensus about which advances are "major," we can't
  refute Hardy's claim that no major advance has been made by a
  mathematician over 50. But his slogan, "Mathematics is a young man's
  game," is misleading, even harmful.

A: Jordan Ellenberg (JSE on MO)
wrote a nice article after Perelman announced his solution of the
Poincaré conjecture:

"Is Math a Young Man's Game? No. Not every mathematician is washed up at 30."
  Slate, May 2003.
  (article link.)

The article ends with this:

"It's only in the presence of both conditions—deduction and inspiration, long experience and youthful audacity—that new math gets made, as it was made by Perelman, and as it was made on the day Poincaré wrote down his conjecture. He was 50 years old."

A: This misconception that mathematics is a young person's game seem to have been pushed most forcefully by Hardy, but the list of examples he gives is very misleading because they all died young and so obviously could not go on to contribute anything further anyway!  He also conveniently forgets some famous counterexamples like Euler and Weierstrass.  Cramer, for example, could be classed as a young prodigy, since he obtained his PhD equivalent at age 20, but the work for which he is known today was done when he was into his 40s.
The question asks for research on this question so I will provide two physics examples from my own reading.
1.) In 1988, Aharonov and colleagues published an influential PRL article on quantum mechanics.  In 2020, Aharonov and Rohlich published a PRL article on quantum mechanics which looks set to be just as influential and is no different in quality or insight to the 1988 paper.
2.) In 1974, Georgi and Glashow published a PRL article on field theory which has been very influential.  In 2020, Georgi published a PRL article on field theory which does not look to differ from the paper published forty-five years earlier in terms of quality and insight.
