It might depend on how you define the quality, but if alertness suffices, then No, it does not seem to be any better to get more sleep before midnight if duration is relatively constant.
See THIS Discover Magazine blog post, which summarizes THIS Science Magazine study. Here are the pertinent bits:
In a sleep lab, the researchers studied people with extreme bedtimes, or chronotypes, both early and late. The larks in the study typically woke up between 4 a.m. and 5:30 a.m. and went to bed by 9 p.m. The night owls, or evening chronotypes, left to their own devices would go to bed at 3 a.m. or 4 a.m. and rise at noon.
In other words, both groups sleep between 7-9 hours per night, but the time of day is significantly different.
All the test subjects...took tests measuring their alertness 1.5 hours after waking, and again 10.5 hours after waking. In the earlier test researchers saw no difference between the two groups’ performances, but in the later test the night owls performed better than the early birds, and also topped their own prior test results.
FMRI brain scans told the rest of the tale. In the night owls, increased activity was seen in two parts of the brain at 10.5 hours — the suprachiasmatic nucleus area and the locus coeruleus — that are involved in regulating the circadian signal. Essentially, the circadian signal was winning out over the pressure to sleep. In the early birds, on the other hand, “the sleep pressure prevents the expression of the circadian signal,” so those individuals were less able to keep their attention focused.
So, it seems that despite not getting to bed before midnight at all, the study shows the night owls fared just as well or better as early birds on measures of alertness.
The post concludes with the caveat that outside the lab, some who are prone to night-owl activities might not have the luxury of a noon wake up time, and thus do worse if they heed the desire to stay up late while also being required to get up early.
I looked around for more, but this was the best I found that seemed like it could try to answer the question based on some metric (alertness throughout the day) to look at simply the time of day of sleep while keeping duration constant. If there were more, I'd be quite interested in:
- perceived refreshedness after a sleep session
- if this claim stems from the fact that many who go to bed late might need to get up early and thus be in a bit of sleep deprivation vs. how the study above proceeded with those who maintained a consistent schedule but simply had their sleep session shifted