Earlier quoted context omitted.
The comment above just said “sleeping pills” which is ambiguous. Melatonin is an OTC supplement. True “sleeping pills” are usually controlled substances and few doctors would prescribe them as first-line options for a patient who shows up with first time complaints of sleep problems. They won’t be prescribed long-term either. The part of the post that says doctors (plural) tried to prescribe the pills makes me think…
Lots of people take diphenhydramine products as sleeping pills and they are advertised as such OTC in the US. Long term Diphenhydramine use is associated with many negative health outcomes and despite the warning labels many people become dependent on them.
The reason diphenhydramine Is associated with a slight increase in dementia risk is the anticholinergic properties. This risk increase is from correlational studies on other medications with anticholinergic medicines being taken for many years by elderly people, so the risk of taking Benadryl occasionally is low to none.
The prescription alternatives like doxepin have the same antihistamine properties without the anticholinergic properties when used at the prescribed dose.
This is an example where people can get themselves into the wrong outcome by assuming anything their doctor prescribes is a last resort quick fix, but anything they can source by themself is safer and superior.