During the day, circadian clock regulation in the PG lowers levels of gap junctions, reducing connectivity with the SPG. The level of [Mg2+]i is high in the SPG, which promotes activity of the efflux transporters, reducing permeability of xenobiotics. During the night, the PG clock increases gap junctions, thereby increasing connectivity with the SPG. The Mg2+ ions diffuse from SPG into the PG, lowering the [Mg2+]i in the SPG. The efflux transporters have reduced activity due to the decline in [Mg2+]i and xenobiotics are retained in the brain.