That you can sleep does not imply you get the same quality of sleep. It's well known that alcohol and caffeine reduce sleep quality. So even if you can sleep after having a coffee, it's probably still not a good idea. Have a decaf if it's after 3pm.
This always reminds me that there is a difference between public health policy and individualised care.
Generally speaking, you're probably correct, and yet for some individuals some of the time some amount of alcohol, caffeine, psilocybin, mdma, etc etc etc, may have a beneficial effect for some period of time.
In case you aren't aware, there are a number of active clinical research trials underway demonstrating the efficacy of MDMA and psilocybin, under the support of the FDA:
In other words, these medicines are being explored specifically through the lens of public health policy. The question of their benefits being a statistical anomaly (when used in appropriate settings) is looking increasingly unlikely.