Anxiety affects sleep through various mechanisms. It can lead to increased arousal and hypervigilance, making it difficult to relax and fall asleep. Anxiety can also cause rumination, where individuals dwell on stressful thoughts, further disrupting their sleep. Physiologically, anxiety stimulates the sympathetic nervous system, increasing heart rate and cortisol levels, which can interfere with the body's natural sleep-wake cycle.