How does practicing meditation help you sleep well?

Most people tend to keep tossing and turning in bed when they are unable to sleep. Some people simply get up, start browsing on their smartphones, watch television, or eat something, which are definitely not healthy practices. There are others that take a sedative to be able to sleep well!