A survey of more than 400 college students conducted by Chegg found that only 16 percent of students got eight or more hours of sleep a night. The survey also found that those sleepless nights are typically due to too much homework and too much attention to online entertainment.

If you are a typical college student dealing with sleep deprivation, you just want some DIY tips for how to recover and not doze off in class. I’ve got you covered.

Why sleep deprivation is bad

Before I delve into ways for you to bounce back from a sleepless night, let me first share why sleep deprivation is bad for you. Not only does it mess up your ability to focus and retain information in class (the whole reason you are in college), but also it can impact your overall health in a not so positive way.

Sleep deprivation can mess with your hormones, increasing your appetite and leading to weight gain. Too little sleep also doubles your risk of heart issues when you are older. Finally, getting less than seven hours of shut-eye on a regular basis damages your immune system and makes you three times as likely to catch a cold.

Stop sleepless nights

Maybe your sleep deprivation is caused by late night studying or maybe you are one of the six percent of the population that suffers from insomnia (true insomnia sufferers experience the inability to fall asleep or stay asleep for at least a month, without the influence of other medical conditions). Here are some DIY ways to get back on the right track when it comes to sleep.

Eat right. Believe it or not, what you eat can impact your ability to get a good night’s sleep. So aim for healthy fare, and avoid fast food.

Work in some exercise. Regular workouts can help you develop a better sleep cycle and fall asleep more easily.

Enjoy some sunshine. Going outdoors and spending some time in natural light can help reset your biological clock, which could be off and interfering with your ability to sleep at night.

How to recover

So you get it—sleep is good, no sleep is bad. But say you have followed all my suggestions above for ensuring you get your regular 40 winks, and yet you can’t sleep. What can you do when you do have a sleepless night? Here are the top five DIY suggestions for how to recover, courtesy of hackcollege.com in a post, “How to Function on Little to No Sleep”:

Take a cold shower. It may sting a bit, but that’s kinda the point—it’s great for waking you up and making you feel more energized.

Eat a good meal. Giving your body some quality fuel—think a healthy combo of proteins and carbs—will help diminish the draggy feeling that sleep deprivation causes.

Get focused. You likely won’t be able to maintain a high level of energy for long, so prioritize what has to be done and be sure to get to those tasks as soon as possible.

Keep moving. It may be tempting to take it easy, but while you have things to accomplish, you will want to be active. Relaxing or being still for too long will not help in your how to recover efforts.

Drink water. Hydration really affects your energy level, especially if you are already running on little or no sleep. So skip the energy drinks and caffeine, and be sure to double up on the amount of water you drink.

Do you have any DIY tips for how to recover from a sleepless night? Let us know in the comments.