Write an article based on this "Pay attention at the beginning of class. Ask the person next to you to wake you up if necessary. Make sure you can wake up when the bell rings. Avoid wearing earplugs or earbuds."
Even if you’re feeling really sleepy, try to look like you’re listening to the teacher at the start of class. Take out a pencil and paper and take a few notes. Make eye contact with the teacher and try to answer a question or two.  This will give the teacher will have the impression that you are paying attention through the whole class, even when you’re asleep. Don’t call too much attention to yourself or it will seem really obvious when you stop responding. At the beginning of class, tell your neighbors that you’re really tired and might try to take a quick nap. Ask them if they wouldn’t mind waking you up if something important is about to happen.  You could say, for example, “Hey Alex, I was up super late last night and I’m exhausted. If I fall asleep, will you wake me up if we start the lab or do partner work?” This is best if you are friends or at least acquaintances with the person next to you. If you don’t like each other, you probably can’t rely on them to wake you up, and they might even report you to the teacher. Don’t get into such a deep sleep that you won’t wake up when it’s time to change classes or go to lunch! Try to just relax and drift off without allowing yourself to go all the way into a deep sleep. Train yourself to sleep lightly by forcing yourself to open your eyes every few minutes or asking your friend to tap you on the shoulder once in awhile. You might sleep better if you can tune out the noise of your classroom with music, but wearing earplugs or earbuds in class is a big warning sign to your teacher. It might also make it harder to hear the bell ring or the teacher’s voice if they call on you.