Older patients taking sleeping pills and anxiety medication like Valium or Xanax have a significantly higher risk of dementia compared to non-users, according to a new French study.

Researchers found that among the 1,063 participants who were 65 and older and lived in southwest France, those who took drugs known as benzodiazepines were 50 percent more likely to develop dementia over a 15-year period, compared with those who did not take the drugs.

Benzodiazepines are often prescribed to help with sleeping problems or anxiety, and even though most of these drugs are only meant to be used for a few weeks or months at a time, the drugs can be habit forming. Previous research found that older adults tend to stay on them longer, sometimes for years.

The new study, published in the British Medical Journal, compared 95 participants who recently used any of 23 benzodiazepines or similar drugs at the start of the study to 968 participants who did not.

Over the next 15 years, there were 253 cases of dementia from both groups, 32 percent of the people who had taken benzodiazepines or similar drugs like Ambien, Halcion, Klonopin, Restoril, Valium, and Xanax, had developed memory loss and difficulty thinking compared to 23 percent who had not taken them. Results of the study meant that around 4.8 in 100 people taking benzodiazepine would develop dementia each year compared to 3.2 in 100 people who did not take the drugs.

Researchers found that even after accounting for other factors that may affect people's dementia risk, such as age, gender, diabetes and early signs of dementia as well as other factors that lead people to start taking benzodiazepines in the first place, researchers found that older adults who took the drugs were significantly more likely to develop dementia.

"Considering the extent to which benzodiazepines are prescribed and the number of potential adverse effects of this drug class in the general population, [their] indiscriminate, widespread use should be cautioned against," the researchers said, according to a news release.

The researchers noted that while they were able to account for the possible effects of depression on dementia risk, they were unable to determine whether anxiety and or sleep disorders, which may be early signs of dementia, affected dementia risk. They said that future research should examine whether the use of benzodiazepines increases the risk of dementia in younger people and whether the drug dosage affects the risk.

"Benzodiazepines remain useful for the treatment of acute anxiety states and transient insomnia. However, increasing evidence shows that their use may induce adverse outcomes, mainly in elderly people, such as serious falls and fall related fractures," study authors added.

"Our data add to the accumulating evidence that use of benzodiazepines is associated with increased risk of dementia, which, given the high and often chronic consumption of these drugs in many countries, would constitute a substantial public health concern," they concluded. "Therefore, physicians should carefully assess the expected benefits of the use of benzodiazepines in the light of these adverse effects and, whenever possible, limit prescription to a few weeks as recommended by the good practice guidelines.