The infection by Trypanosoma brucei brucei (T.b.b.), a protozoan parasite, is characterized by an early-systemic stage followed by a late stage in which parasites invade the brain parenchyma in a T cell-dependent manner. Here we found that early after infection effector-memory T cells were predominant among brain T cells, whereas, during the encephalitic stage T cells acquired a tissue resident memory phenotype (TRM) and expressed PD1. Both CD4 and CD8 T cells were independently redundant for the penetration of T.b.b. and other leukocytes into the brain parenchyma. The role of lymphoid cells during the T.b.b. infection was studied by comparing T- and B-cell deficient rag1-/- and WT mice. Early after infection, parasites located in circumventricular organs, brain structures with increased vascular permeability, particularly in the median eminence (ME), paced closed to the sleep-wake regulatory arcuate nucleus of the hypothalamus (Arc). Whereas parasite levels in the ME were higher in rag1-/- than in WT mice, leukocytes were instead reduced. Rag1-/- infected mice showed increased levels of meca32 mRNA coding for a blood /hypothalamus endothelial molecule absent in the blood-brain-barrier (BBB). Both immune and metabolic transcripts were elevated in the ME/Arc of WT and rag1-/- mice early after infection, except for ifng mRNA, which levels were only increased in WT mice. Finally, using a non-invasive sleep-wake cycle assessment method we proposed a putative role of lymphocytes in mediating sleep alterations during the infection with T.b.b. Thus, the majority of T cells in the brain during the early stage of T.b.b. infection expressed an effector-memory phenotype while TRM cells developed in the late stage of infection. T cells and parasites invade the ME/Arc altering the metabolic and inflammatory responses during the early stage of infection and modulating sleep disturbances. Author summary: Trypanosoma brucei (T.b.) causes an early systemic and a late encephalitic infection characterized by sleep alterations. In rodent models, brain invasion by T.b. brucei (T.b.b.) is strictly dependent on T cells. However, an in-depth characterization of T cell functions and phenotypes in the outcome of T.b.b. infection is still lacking. Here we found that during the early stage of infection of mice, most brain T cells differentiated into memory cells, and acquired a tissue-resident memory phenotype during the encephalitic stage. CD4 and CD8 T cells were redundant for the invasion of other T cells and parasites into the brain. Early after infection T.b.b. and leukocytes invade different circumventricular organs (brain areas that lack a blood-brain barrier) including the median eminence (ME) located close to sleep-regulating arcuate nucleus (Arc). T.b.b. infection induced the expression of immune and metabolic molecules in this area. Lymphocytes modulated 1) the levels of invading parasites and leukocytes in the ME; 2) the structure of the blood/ hypothalamus interphase and 3) the expression of IFN-γ in the ME/Arc early after infection. Lymphocytes may also be involved in the regulation of sleep alterations observed in African trypanosomiasis. [ABSTRACT FROM AUTHOR]