Ellagic acid protects mice against sleep deprivation-induced memory impairment and anxiety by inhibiting TLR4 and activating Nrf2. Here, NFE2L2 is linked to memory impairment.