Anyone here takes pills to sleep?

AFter 10 years of horrible sleep I finally visit a doctor to get me something to sleep. My family goes crazy about how bad it is to take a pill to sleep. Any experiences here with that?
Everything I post is trash.