I taught CS at university level for a few years, but my first degree was in biochem so I knew how brains work. Being rested is 90% of the game. My students did better because I was careful to schedule tests around other instructors, taught class outside on nice days (projecting on a wall), and hosted homework nights before tests that ended just late enough that everyone actually went to bed.
You aren't crazy, teachers just aren't generally very good.