Consumer Reports shares its reporting on what’s safe, what isn’t, and how to get a good night’s sleep.

Older over-the-counter antihistamines such as diphenhydramine (Benadryl Allergy, Nytol, Sominex, Tylenol PM, and generic versions), and doxylamine (Unisom and generic) may be useful for very short-term insomnia. But rebound insomnia is a concern, as is daytime drowsiness, confusion, constipation, dry mouth, and problems urinating. And a 2015 study published in JAMA Internal Medicine reported a higher risk of dementia in people who regularly used those type of drugs, which are known as anticholinergics.

Safer strategy: Use OTCs for no more than one or two nights at a time. If your insomnia lasts longer than a few days, check in with your doctor.