If u r a good ,obidient, honest, truthful student you should never tell a lie and try to escape from that situation instead apologize to u r mistake . if a student is really concentrated and dicipline you will never sleep in the class. So try to be diciplinary and concentrated student in the class, if u r doing so u will never get sleep in the class even if u try.
The major reason for sleeping in class is lack of sleep at night. first of all children should have atlest 8 hrs. sleep. So try to manage u r timtable according to it.