Researchers have found a link between commonly used medicines, including over-the-counter treatments for conditions such as hay-fever, to dementia.
All of the types of medication in question are drugs that have an "anticholinergic" effect.
Experts say people should not panic or stop taking their medicines.
In the US study in the journal JAMA Internal Medicine, higher doses and prolonged use were linked to higher dementia risk in elderly people.
The researchers only looked at older people and found the increased risk appeared when people took drugs every day for three years or more.
All medicines can have side-effects and anticholinergic-type drugs that block a neurotransmitter called acetylcholine are no exception.
Patient information leaflets accompanying such drugs warn of the possibility of reduced attention span and memory problems as well as a dry mouth.
But researchers said people should also be aware that they might be linked to a higher risk of developing dementia.
Dr Shelly Gray and colleagues from the University of Washington followed the health of 3,434 people aged 65 and older who had no signs of dementia at the start of the study.
They looked at medical and pharmacy records to determine how many of the people had been given a drug with an anticholinergic effect, at what dose and how often and compared this data with subsequent dementia diagnoses over the next decade.
Drugs in the study
The US study does not name specific brands but does outline the types of treatments investigated, which include tricyclic antidepressants for treating depression, antihistamines used to treat hay-fever and allergies and antimuscarinics for treating urinary incontinence.
Most of the drugs were given on prescription, rather than bought at the pharmacy over-the-counter.
Over the course of the study, 797 of the participants developed dementia.
The study estimated that people taking at least 10 mg/day of doxepin (antidepressant), four mg/day of diphenhydramine (a sleep aid), or five mg/day of oxybutynin (a urinary incontinence drug) for more than three years would be at greater risk of developing dementia.
The researchers said doctors and pharmacists might want to take a precautionary approach and offer different treatments instead.
And when there was no alternative, they could give the lowest dose for the shortest time possible.
Dr Gray said some of the study participants had agreed to have an autopsy after their death.
"We will look at the brain pathology and see if we can find a biological mechanism that might explain our results."
A spokesperson for the UK's Alzheimer's Society, Doug Brown, said there had been concerns that regular use by older people of certain medications with anticholinergic effects, such as sleep aids, could increase the risk of dementia in certain circumstances.
"However, it is still unclear whether this is the case and if so, whether the effects seen are a result of long-term use or several episodes of short-term use. More robust research is needed to understand what the potential dangers are, and if some drugs are more likely to have this effect than others.
"We would encourage doctors and pharmacists to be aware of this potential link and would advise anyone concerned about this to speak to their GP before stopping any medication," Dr Brown said.
He said the charity was funding more research in this area to better understand any connections between these and other drugs on the development of dementia.
The Medicines and Healthcare Products Regulatory Agency, which monitors the safety of medicines in clinical use in the UK, said it would review any new evidence.
Drug company Johnson & Johnson Ltd said many hay-fever products sold in the UK now contain newer, second-generation antihistamines - not the type looked at in the study.
A representative of the UK trade association for manufacturers of over-the-counter drugs, Matthew Speers, said over-the-counter allergy and sleeping aid products were not intended to be used continuously and people were advised to talk to their pharmacist or doctor if they needed to use such products long-term.
"There are a range of allergy products on the market which contain a number of different ingredients, many of which were not considered in this study," he said.
The head of research at Alzheimer's Research UK, Simon Ridley, said the study was interesting but not definitive and there was no evidence that the drugs caused dementia.