I'm curious about this as well. To me, 'tired from the classes' implies that the classes have happened recently and the children are physically exhausted. Whereas 'tired of the classes' means that the classes have happened at some point in the past and the children are frustrated and exasperated with their classes in general.
Klasse -> grade like "I'm in first grade at school" Time -> classes like Math, Psychology, Geography, History, etc... It's called "time" cause it means "hour" and a lesson/class usually lasts almost or exactly 1 hour.
So "Børnene er trætte af klasserne" would mean that you are tired of the other grades. Like other pupils from second grade or third grade.
I'm not a native speaker but it's the same logic in German and Hungarian.