Sleeping pills should not be taken at all, period. As some people may say, it is addictive but that is untrue, but it can mutate into a tolerated drug. this meaning, your body will become immune to its chemicals, and it will soon have no affect on you. And due to the chemicals used, a tolerance can develop quite quickly. Similar tolerances are common with antibiotics.
Most doctors will not prescribe sleeping pills, even if its a last resort. a doctor may prescribe a supply of only 3 or 4 pills.
It is recommended, by doctors, that a person who i suffering from insomnia (difficult to sleep) should change their evening patterns, also referred to as Sleep Hygiene. This usually requires a patient to change their usual habits; like exercise, diet, eating before sleeping, change time of going to bed, change rooms etc etc...
overall, it is not recommended to take sleeping pills...good luck