The ingredient in NyQuil that causes users to sleep is an antihistamine called doxylamine. The strong sedative power of antihistamines causes them to be used as active ingredients in many cold medicines and sleep aids, according to LiveScience.
Antihistamines do not allow the body's histamines to attach to receptors, preventing the histamines from causing cold symptoms within the body. LiveScience explains how histamines play a crucial part in the body's sleep and wakefulness patterns. When the antihistamines prevent them from playing this role, extreme drowsiness often occurs. However, more recently developed antihistamines, such as loratadine and fexofenadine, tend to cause less drowsiness than those included in the first generation.