Caffeine effects sleep by causing sleep disturbances. It can delay the onset of sleep, reduce total sleep time, and disrupt the sleep cycle. Limiting caffeine intake, especially in the afternoon and evening, helps avoid these disruptions.