I think you'll find many mathematicians agree with it.
For example, The Abel Prize [1] does interviews with their award winners every year and quite often they are asked about this question, and most of them agree that as a mathematician your peak "mathematical powers" so to speak and energy are at their highest in your 20s and 30s, while afterwards you have to rely more on experience to make up for it as you grow older.