Health experts say caffeine is a major cause of sleep problems. Studies show caffeine may be responsible for 10–20% of long-term insomnia cases. People who cannot process caffeine easily may struggle to sleep. Experts advise avoiding coffee, tea, chocolate, and other caffeinated foods 6–8 hours before bedtime.