Use caution: nighttime NyQuil already contains a sedating antihistamine (doxylamine), so adding melatonin stacks one sleep-inducer on another and can make you much drowsier — ask a pharmacist before combining them.
Nighttime NyQuil (Cold & Flu / Severe) contains doxylamine succinate, a sedating antihistamine, and its FDA/DailyMed label warns that "marked drowsiness may occur" and that "alcohol, sedatives & tranquilizers may increase drowsiness," directing you to ask a doctor or pharmacist before use if you take sedatives or tranquilizers. Melatonin is taken specifically to bring on sleep, and the NHS warns that taking anything that makes you sleepy alongside it "can increase the sedating effects" and "make you feel much more drowsy." So the concern isn't a chemical reaction but additive sedation — two sleep-promoting agents together can leave you over-sedated, groggy, and impaired the next morning. NyQuil also delivers acetaminophen, which has its own separate liver-related dosing limits unrelated to melatonin.
Treat the combination as an additive-drowsiness risk: take only the labeled NyQuil dose (do not exceed 4 doses in 24 hours, and never combine it with another acetaminophen product or 3+ alcoholic drinks a day because of liver-damage risk), avoid alcohol entirely, and do not drive or operate machinery. Watch for excessive sleepiness, confusion, dizziness, slowed or shallow breathing, and difficulty waking — these signal over-sedation and warrant urgent medical help. Be extra cautious in older adults (doxylamine's anticholinergic effects raise the risk of next-day grogginess and falls), and avoid stacking these if you also take other sedatives, benzodiazepines, opioids, muscle relaxers, or sedating antidepressants. Many people find they simply don't need added melatonin, since NyQuil's antihistamine already makes you sleepy. Because NyQuil isn't a single drug and melatonin's effect depends on you and your other medicines, run the combination past a pharmacist or doctor first.
This is general reference, not medical advice, and not a guarantee of safety. Interactions depend on your doses, health conditions, and other medicines. Always confirm with your pharmacist or doctor before combining products, and follow the dosing on each label.