I know there is obviously a having children element and there is obviously some correlation with having kids and moving out of London. There is also a correlation between staying in London and carrying on doing things that lots of people give up altogether once they reach a certain age. I know several people with young kids who still live in London and still, now and again, go out. What my impression is, is that it's much easier just to casually pick a night that looks good and go along for a bit and no-one really bats an eyelid at there being a scattering of older people. I don't mean nights or "scenes" that are targetted at or centred around an older crowd. There are those in London too, but they are certainly not your only option if you're over 40 and want to go out without feeling like an abnormality.
It's actually one of the first things I noticed when I arrived in London as a "young" person, that many nights had a much wider spread of ages than I was used to where I was before (which was Glasgow).
Of course I may be wrong but I'm not sure how we can settle this objectively.