Obstructive sleep apnea (OSA) is characterized by intermittent hypoxemia, sleep fragmentation, and excessive daytime sleepiness. OSA patients are at an elevated risk for circadian rhythm disturbances. Histamine is known to regulate the sleep-wake cycle predominantly via histamine H1 receptors. We utilized a C57BL/6 mouse model exposed to chronic intermittent hypoxia (CIH) for three weeks to assess alterations in circadian rhythmicity. Sleep architecture and voluntary wheel-running activity were evaluated. Additionally, c-fos expression and mPer2 levels in the frontal cortex (FC) and the suprachiasmatic nucleus (SCN) were examined. BV-2 microglial cells were subjected to intermittent hypoxia (IH) for 12 h to explore the underlying signaling pathways. CIH exposure led to a significant prolongation of the wake phase and a reduction in the Non-rapid eye movement (NREM) phase, accompanied by increased sleep fragmentation and disruption of circadian rhythms. Treatment with mepyramine, an H1 receptor antagonist, mitigated these effects by reducing arousal duration, extending NREM phase, and decreasing sleep fragmentation. CIH also resulted in increased c-fos expression and elevated mPer2 levels in the FC and SCN, both of which were reversed following mepyramine administration. In vitro studies on BV-2 cells demonstrated that histamine exerts its modulatory effects through the activation of the PLC and PKA signaling pathways, influencing mPer2 expression via the regulation of K+, Na + -Ca2+, and Ca2+ ion channels. In conclusion, CIH disrupts circadian rhythms through histamine-mediated mechanisms, and mepyramine effectively ameliorates these disruptions. These findings highlight histamine as a promising therapeutic target for addressing circadian rhythm disorders associated with OSA.