Forget the sleeping pills and get frisky before bedtime. A study found that sex is as good as – or even better -- than sleeping pills when it comes to sleep quality. Researchers found that 75% of survey respondents said they slept better after having sex close to bedtime. 64% of those surveyed said sleeping pills had a similar or worse effect on their sleep compared to sex.