There are many times in your college career when an all-nighter is necessary, whether you’re cramming for a test or finally getting around to writing that term paper. In fact, 99 percent of students admit to cramming, according to BBC.

While an all-night study session is not the most effective way to learn, there are certain things you can do to make it more effective. So while we’re definitely not advocating for you to pull an all-nighter, we know you will at some point, so: follow these eight tips next time you find yourself hanging out in the library.

Have a Game Plan for Your All-Nighter

Never go into your all-nighter with reckless abandon. Before studying, create your game plan. What do you need to study? How much information do you need to go over? Are there chapters you need to read or a study guide you need to complete?

When you look at your hefty to-do list, determine how much time you need to allocate for each task. Tackle the most time-consuming items first and then move down your list. If you map out your night before you start, you can make sure you have enough time to get through everything, or at least prioritize the most important things, first.

Use the 50-10 Rule

Now that you’ve planned out your night, use the 50-10 rule to maximize your productivity. The 50-10 rule means alternating between 50 minutes of studying (or writing) followed by 10-minutes of rest. Scheduling pre-determined work and rest periods will help you use your time more effectively; the 10-minute breaks are just long enough to let your brain and body regroup, but not long enough to take you away from the task at hand.

Note: This method only works if you hold yourself accountable for your work and rest times. Set a timer and stick to it.

Eat Filling, Nutritious Food

It’s easy and convenient to grab a combo meal or burrito from the nearest fast food joint, but your brain needs nourishing food to function properly and absorb information. Your best bet is nutrient-dense snacks that are high in (good) fat and low on carbs and sugar.

Before you sit down to study, make yourself a healthy, filling dinner like chicken and vegetables. If you live in the dorms and don’t have access to a full kitchen, find a healthy restaurant nearby or head to the cafeteria salad bar, where you can likely make a protein- and veggie-heavy salad. It’s also important that you hydrate, so make sure you drink enough water and avoid sugary drinks and soft drinks.

Make sure you have snacks on hand to keep your energy up all night as well. Nuts are filling and a great source of healthy fats so keep some in your apartment or dorm room. Apples and yogurt are also great for staying energized through the night. If you need some more recommendations, check out the 12 best brain foods to eat before a test.

Eliminate Distractions

You have a limited amount of time to study so you need to eliminate, or at least minimize, distractions that will slow your productivity. Try not to use your cell phone, ignoring text messages and notifications. If you can’t help yourself, put it in Airplane Mode or “Do Not Disturb,” to limit noisy, distracting alerts.

Also, stay off social media. Checking Facebook or Twitter will eat away precious time you could be using to complete important tasks.

Let There Be Light

Make sure your room or study space has adequate lighting. Not only will this help you see your books or computer without straining, it can help you stay awake. Darkness sends a critical signal to the body that it’s time to rest, whereas light exposure at night stimulates alertness, according to a sleep study from ResMed. You’ll already be fighting the urge to fall asleep, so do yourself a favor and keep the lights on.

Go Easy on the Caffeine

What’s an all-nighter without a pot full of coffee? It’s a good all-nighter. Coffee can help you stay awake and alert, but too much caffeine can actually be counterproductive. Up to 400 MG of caffeine a day appears to be safe for healthy adults, according to the Mayo Clinic, but remember, that number also includes any coffee you drank earlier in the day.

One or two cups every three to four hours is okay, but any more than that can cause nervousness, restlessness, and irritability which makes it even harder to concentrate.

Ditch the Energy Drinks

While caffeine is not recommended for an effective all-nighter, always choose coffee over energy drinks if you plan to drink something caffeinated no matter what. You may have used Monsters and Red Bulls to get you through long nights in the past, but the sugar in these drinks causes insulin and blood sugar spikes, which leads to an energy crash—you falling asleep with your book on your chest. Stick to coffee and water; when it comes to energy drinks, you’re better off without them.

“Practice Like You Play”

This is an old saying used in sports, meaning: If you want to be successful in a game or match, you need to practice the way you play. The same can be said for taking a test. So many students know the material while studying or ace a practice test only to perform poorly on the exam.

“A common mistake is for students to work on math problems in too relaxed a posture. They should be sitting at a desk, with minimal distractions, and working the problems exactly as if they were testing,” according to Larry Coty from USA Test Prep .

When studying, do whatever you can to re-create a real, test-like environment. Time yourself, eliminate distractions, sit up straight at your desk, and try to get through the questions without using study aids, which are likely not be allowed during the test. Creating a test-like environment when you study will help you remain calm and confident during the actual exam.

At this point, you’ve done all you can to prepare. Try your best on your test, and try to give yourself more time to study next time around. When your test is over, remember to eat nutritious foods and hydrate. You may need a few days to recover from lack of sleep so rest, relax, and remember to take care of your body.

—

Use College Raptor to discover personalized college matches, cost estimates, acceptance odds, and potential financial aid from schools around the country—for FREE!