Not sleeping impairs my morning cognition - a lot. Melatonin is part of the rotating stacks I use to mitigate insomnia.
My mornings have always been impaired, going back to pre-school. Meds don't make my mornings any worse than my baseline.