Sleep medicines come in a wide variety, some much more commonly used than others. The original sleep medicines that were used before the development of pharmaceutical chemistry were all opium based. Even though this could definitely help someone fall asleep, use of opium to induce sleep was abandoned by the medical community long ago for obvious reasons.
A lot of things tried to fill the place of opium as a sleep medicine, some were better, some were actually just as bad or worse. Chloral hydrates as a sleep medicine are a good example of a drug which was just as dangerous. Generally supplied in liquid form, chloral hydrates can almost immediately induce sleep, and the effects of which are greatly enhanced with alcohol. I'm sure you recognize the phrase "slip a Mickey in a drink". The Mickey refers to Chloral hydrate sleep medicine, and unfortunately for many of the victims of this the risk of overdose is greatly increased when the drug is combined with alcohol. The side effects of chloral hydrates make Xanax look quite mild in comparison, wild paranoia and intense confusion occurred quite frequently, as well as a host of other problems associated with psychosis and the central nervous system. Problems with white blood cell count and many others are associated with chloral hydrate as a sleep medicine.
Bromides and barbiturates were other sleep medicines which were commonly used, and also had a whole range of side effect, addiction, dependency and overdose problems. This was of course prior to the use of benzodiazepines as sleep medicines. When Diazepam (Valium) was first introduced as a sleep medicine, nearly all other pharmaceutical insomnia treatments were made obsolete. Unfortunately Valium and the other benzodiazepines that followed (Ativan, Xanax) as sleep medicines also has many negative side effects, such as kidney and liver damage, though chances of overdose are much lower than with previous sleep medicines. Because of the euphoric effect of this sort of sleep medicine it is very addictive, and benzodiazepines are generally not prescribed for periods longer than 6 weeks.
The newest sleep medicine to come out is Ambien. While Ambien does not belong to the benzodiazepine family, it is quite similar. For instance, an overdose of Ambien can be treated with Flumazenil, the same drug that is used to treat overdoses of benzodiazepines. An overdose of Ambien sleep medicine can actually occur far more easily than with a drug like Valium or Xanax. Like every other pharmaceutical sleep medicine that has come out, Ambien comes with a large list of side effects. The most troubling of which are memory loss, paranoia, hallucinations and other similar side effects that have been seen with other sleep medicines. Allergic reactions have been reported in which the patient breaks out in hives and experiences swelling of the face, tongue and throat. This can potentially be fatal.
Some of the best sleep medicines come straight from nature. There are things like Valerian Root and St John's Wort which have been used for centuries to cure anxiety and insomnia but are just now being examined by the psychological and psychiatric communities for their potential value as insomnia treatments. Sleep medicine from nature generally has very few side effects if any, and there is no risk of addiction as there is with pharmaceutical sleep medicine. Except in extreme cases, natural medicines should first be considered.