Try having some coffee before the boring class commences. Ты will not only drive away the sleep but also remain alert and ask Вопросы and actively participate in the classroom to ensure that Ты are on вверх of your attention. If it's not possible to have coffee before the class, then, take a quick break to the уборная, туалетная комната and splash some water on your face and have a chewing gum and return to the class. Sit up straight, feet planted flat on the floor. Don't lean back или slouch in the seat,don't rest your chin on your hands, etc. If you're in a posture that discourages sleeping, it will be easier to stay awake. Try and focus on the lecture. Take notes. Maybe skim a little ahead in your textbook so Ты have an idea of what the lecture will be on. Listen for key words или ideas Ты saw in the reading..