We're not going to claim we never caught 40 winks during a class at school -- but, as far as we can remember, we never did it while the leader of the free world was talking to us.

Pupils at a Michigan high school had won a competition for President Barack Obama to speak at their graduation ceremony and most were suitably impressed and attentive when the moment came around.

But as Obama talked about the importance of education, one member of the Kalamazoo Central student choir began to look like he'd spent too long on the old PS3 the night before.

Unfortunately for the tired kid, he was sitting directly behind the president and was therefore in direct view of TV cameras which caught his every yawn and moment of shut-eye.

At one point the lad appeared to have nodded off entirely and with his head he was jolted back to life when classmates started applauding. Unsurprisingly, the impromptu snoozing made the youngster an instant hit online where his antics went viral on Twitter and YouTube.

Keep reading to see the snoozing student.