There are several different types of prescription sleeping pills, classified as sedative hypnotics. In general, these medications act by working on receptors in the brain to slow down the nervous system. Some medications are used more for inducing sleep, while others are used for staying asleep. Some last longer than others in your system (a longer half life), and some have a higher risk of becoming habit forming.