It's best to avoid alcohol while you're taking melatonin — combining the two can deepen sedation and can also make the melatonin work less well, so drinking is not recommended.
Melatonin is the hormone your body releases in darkness to nudge you toward sleep, and a supplement or tablet adds to that signal. Alcohol works against this in two ways. First, both are sedating, so together they can drop you into an unusually deep sleep — the UK's NHS warns this can go far enough that "you do not breathe properly and can have difficulty waking up," a real safety concern rather than just next-day grogginess. Second, the NHS says to avoid alcohol because "it can affect the way melatonin works," so drinking can undercut the reason you took it. NHS answers the plain question "Can I drink alcohol while taking melatonin?" with a flat "No," which is firmer than a simple "use caution." NIH's NCCIH doesn't name alcohol directly, but it backs the underlying picture: anyone taking other medicine should consult their health care provider before using melatonin, and melatonin can linger and cause daytime drowsiness — advice that plainly extends to mixing it with a sedative like alcohol.
Warning signs while both are in your system: unusually heavy or "can't wake up" sleep, slow or shallow breathing, extreme drowsiness, dizziness, confusion, or heavy next-morning grogginess — slowed or difficult breathing or trouble rousing someone is a medical emergency, so call 911. Do not drive, cycle, or operate machinery if the combination leaves you sleepy, dizzy, foggy, or slow to react. Be most careful (or skip it entirely): older adults, since NCCIH notes melatonin can stay active longer and cause daytime drowsiness in older people; anyone taking other sedating medicines or drugs (opioids, benzodiazepines, sleep aids, cannabis); and people who drink regularly or heavily — talk to a doctor or pharmacist first. The sources give no "wait X hours after drinking" rule; NHS advises avoiding alcohol throughout your course of melatonin rather than spacing the two, so the practical takeaway is to skip alcohol on nights you take melatonin. Check with a clinician before starting melatonin if you take any other medicine, have a health condition, or drink regularly — and promptly if you notice breathing problems, can't wake normally, or have unusual sleep behavior.
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.