Despite their differences, alcohol and caffeine have one thing in common - their ability to impact sleep quality.