It can vary from person to person, but addiction to sleeping pills can develop after just a few weeks of use. The risk of addiction is higher when the medication is taken in larger doses or for longer periods than prescribed, or when it is taken in combination with other substances, such as alcohol. It is important to always take sleeping pills exactly as prescribed and to talk to a doctor if you have concerns about dependence or addiction.