Researchers found people who took sleeping pills such as Ambien were three and a half times more likely to die than people who didn't take them.
The medication is sometimes used to treat insomnia.
Doctors say insomnia can be an early symptom of more serious conditions such as heart disease, diabetes or cancer. So doctors say it's too early to conclude taking sleeping pills is causing the increased risk or whether it's due to other health problems.
The study appears in the British medical journal Open.