In the current study, we first demonstrated that TMAO was involved in SD-induced cognitive dysfunction and FMO3 inhibitor DIM alleviated cognitive impairment in CSR mice by reducing TMAO level, upregulating astrocytic SREBP2 expression and brain cholesterol content, and finally reversing a synaptic loss, which offers novel insight into therapies for cognitive impairment after sleep deprivation (Figure 7). The gene discussed is FMO3; the disease is Cognitive impairment.