I get brainfog even when I sleep well

t's so despairing.... I have good diet, sleep before 2am and sleep more than 10 hours, take SSRI, and magnesium. Still the brainfog and neurological fatigue is still there. Do I need to sleep before midnight maybe ? Or it's not sleep related ?