WARNING: The following contains spoilers for Demon Slayer: Kimetsu no Yaiba Season 2, Episode 12, "Things Are Gonna Get Real Flashy!!," now streaming on Funimation, Hulu and Crunchyroll.
As Demon Slayer: Kimetsu no Yaiba's favorite (granted, only) Thunder-Breather, Zenitsu Agatsuma is a force to be reckoned with -- when he's asleep. He alternates between being a sniveling coward and a rage-fueled tyrant while he's awake, but at least he tries. Travel companion and friend of protagonist Tanjiro Kamado, Zenitsu is just as devoted to saving lives as a Demon Slayer as anyone else in the Corps. While he often fails in his conscious attempts to fight demons, the moment he falls asleep, he tends to leave a trail of obliterated demons in his wake.
A user of Thunder-Breathing, one of the five main Breathing Styles used by Demon Slayers, Zenitsu's explosive technique, Thunderclap and Flash, devastates demons in the blink of an eye. The kicker, however, is that Zenitsu can only properly use his Thunder-Breathing when he is sound asleep. This would be terribly inconvenient for most Demon Slayers, but it turns out that if there's one thing Zenitsu can reliably do (besides scream), it’s falling asleep mid-battle.
As far as why Zenitsu so often falls asleep in the midst of a bloody and deadly demon confrontation, the answer is simple: he's just that scared. The vast majority of Muzan Kibutsuji's demons are hideously disfigured, and all possess otherworldly power known as a Blood Demon Art. In all fairness, it makes more sense that Zenitsu is so terrified by them than it does that Tanjiro and Inosuke are not. It is odd that the horror drives him into sleep, but the end actually justifies the means in Zenitsu's case.
Zenitsu does, however, appear to retain a certain degree of awareness while asleep. Even during Demon Slayer's "Mugen Train" and "Entertainment District" arcs, he continued fighting in his sleeping state, rather than just unleashing a single blow as he had at the start of the series. While he appears to be a very talented Thunder-Breather when asleep, in truth he only ever managed to learn the first form, Thunderclap and Flash. However, Zenitsu has amped up the technique's power with what he has dubbed Thunder-Breathing, First Form: Thunderclap and Flash - Sixfold.
Zenitsu is calm and collected while asleep, acting with extreme precision and with a slight flair for dramatics. This all-business persona is a far cry from his constant, petulant screaming about anything and everything when he's awake. Yet beneath all his eccentric and occasionally annoying behavior, the core of Zenitsu's problem is that he has very low self-esteem. He knows he can be a coward but can't help it, saying that no one hates him more than himself. His own self-loathing is equally as crippling as his fear of demons, if not more so.
On the bright side, Zenitsu appears to be on the path to true self-improvement in Demon Slayer. At the time of writing, the anime is at the height of the "Entertainment District" arc and Zenitsu has already demonstrated his overwhelming fear of demons is no longer crippling. He doesn't whine before solo missions and even stood up to Daki, Upper-Rank Six of the Twelve Kizuki. Zenitsu still must be asleep to perform his Thunder-Breathing Technique, but at least now he doesn't need to be terrified into unconsciousness first.