Sleeping pills commonly prescribed in the UK may increase the risk of death more than four-fold, according to new research.
The higher the dose, the greater the risk of dying, while people on higher doses also had an increased risk of cancer, experts found.
A wide range of drugs was analysed for the study of more than 10,500 people taking sleeping pills.
They included drugs used in the UK, such as benzodiazepines (including temazepam and diazepam), non-benzodiazepines (including zolpidem, zopiclone and zaleplon), barbiturates and sedative antihistamines.
Around a third of people in the UK are thought to have bouts of insomnia, and it can become a debilitating problem for some.
Insomnia tends to be more common in women and is more likely to affect people as they get older.
The research from experts at the Jackson Hole Centre for Preventive Medicine in Wyoming and the Scripps Clinic Viterbi Family Sleep Centre in California found that people prescribed sleeping pills were 4.6 times more likely to die during a 2.5 year period compared to those not on the drugs.
Those taking the lowest doses - four to 18 pills a year - had a 3.6 times higher risk of dying compared to non-users - something the researchers said was their "most striking" finding.
But the higher the dose, the greater the risk - with those taking 18 to 132 pills a year having a 4.4 times higher risk of dying, and people on more than 132 pills a year having a 5.3 times higher chance of death.
The group of people taking the highest doses each year accounted for 93% of all prescriptions in the study. This group were also 35% more likely to develop a major cancer.
For the individual drug zolpidem, the risk of death was 5.7 times higher and 6.6 times higher for temazepam.
The researchers, writing in the journal BMJ Open, concluded: "As predicted, patients prescribed any hypnotic had substantially elevated hazards of dying compared to those prescribed no hypnotics."
They added: "Receiving hypnotic prescriptions was associated with greater than three-fold increased hazards of death even when prescribed fewer than 18 pills a year."
The experts said their results held true even when other factors, such as whether a person had an illness such as heart disease, were taken into account.
The effects were greatest among the 18 to 55-year-old age group.
During the study, patients taking sleeping pills were compared with 23,500 people not on the drugs.
While the overall number of deaths in each group of drugs was quite small, there were stark examples, according to the study.
There were 265 deaths among the 4,336 people taking zolpidem, compared with 295 deaths among the much larger group of 23,671 people who had not taken sleeping pills.
The authors estimated that between 6% and 10% of adults in the US took sleeping pills in 2010.
They said: "The meagre benefits of hypnotics, as critically reviewed by groups without financial interest, would not justify substantial risks.
"A consensus is developing that cognitive-behavioural therapy of chronic insomnia may be more successful than hypnotics."
The authors said their findings, together with similar findings in previous studies, should be weighed up "in order to reconsider whether even short-term use of hypnotics, as given qualified approval in National Institute for Clinical Excellence (Nice) guidance, is sufficiently safe".
BMJ Open editor in chief Dr Trish Groves said: "Although the authors have not been able to prove that sleeping pills cause premature death, their analyses have ruled out a wide range of other possible causative factors.
"So these findings raise important concerns and questions about the safety of sedatives and sleeping pills."
NHS guidelines say zolpidem should only be used at the lowest possible dose and for a maximum of up to four weeks.
Zaleplon should only be used at the lowest possible dose and for a maximum of up to two weeks, while temazepam should be taken for a maximum of four weeks.
NHS Information Centre figures for insomnia prescriptions show that, in 2010 in England, there were 2.8m prescriptions dispensed for temazepam and almost 5.3m for zopiclone.
There were also more than 725,000 prescriptions dispensed for zolpidem and more than 9,400 for zaleplon.
Nina Barnett, from the Royal Pharmaceutical Society, said: "This is an important study and, although it is unlikely to radically change prescribing in the immediate term, it should raise awareness and remind both patients and prescribers to the potential risks of sedative use for insomnia.
"The association between mortality and sedation is not new and this research tells us is that people who took these medicines were more likely to die than people who didn't take them.
"However it does not mean that the deaths were caused by the medicine.
"Patients should not stop taking any prescribed medicines straight away. If you are concerned about your medicines, discuss this with your pharmacist or doctor about other ways of getting help with sleep problems so you don't have to use medicines."
Malcolm Lader, professor of clinical psychopharmacology at the Institute of Psychiatry at King's College London, said people should not panic as a result of the findings and stop their medication suddenly.
He said patients could suffer epileptic fits or serious withdrawal symptoms if they stopped their medication suddenly.
Professor Lader said the research was a careful study from a well-respected professional but more studies were needed.
"I agree that these drugs do have problems but I find some of these results quite difficult to accept," he said.
"The main one is that with 18 doses a year you have three times the mortality - that's quite incredible because you would have people dropping like flies.
"The study needs to be replicated in a different sample and I think we need to hold judgment until we have further studies.
"What we don't want is people stopping sleeping tablets and then going through a very disturbing period of insomnia.
"People should discuss this with their GP but should not under any circumstances stop taking their medication."
The researchers said that in 2010 sleeping pills may have been associated with 320,000 to 507,000 excess deaths in the US alone.
But they stressed this was an estimate of the number of deaths associated with the drugs, rather than definitely caused by the drugs.
They said: "We cannot be certain what portion of the mortality associated with hypnotics may have been attributable to these drugs, but the consistency of our estimates across a spectrum of health and disease suggests that the mortality effect of hypnotics was substantial.
"Even 10,000 yearly excess deaths caused by hypnotics would be too many."
Professor Allan Young, chair of the Royal College of Psychiatrists' psychopharmacology special interest group, said: "These findings highlight that people prescribed sleeping tablets have an increased risk of death.
"Poor sleep is commonly linked to mental health problems, such as depression, which are known to be associated with a poorer outcome for physical illnesses.
"Good medical practice should take this into account and consider the individual's overall physical and mental health."