How to get a good night’s sleep is the question I probably hear more than any other, even SNL characters bemoan the lack of sleep.

Did you happen to catch Eddie Murphy on Saturday Night Live?

I, like everyone else I talked to this week, thought he was hilarious. It was great to see him bring back classic characters like Mister Robinson and Gumby, decades after he last performed on SNL.

But there was another sketch that caught my eye. Maybe you saw it, where his future son-in-law is laying on a cheap blow-up-mattress while visiting for Christmas. Inevitably, the air mattress pops with the young man laying on it, and he ends up yelling out in anger in the middle of the night.

It stood out, of course, because it was funny. But it also because of how relatable that frustration is. Bad sleep can derail your day — especially during the holidays.

We already know how important a good night’s sleep is. Without it, we’re typically tired, irritable and unable to make our best judgments.

A recent study from Michigan State University illuminated just how devastating bad sleep is.

The researchers had 77 participants stay awake in a lab all night, while another 63 participants were able to get a full night’s sleep at home. Both sets of participants — those who were sleep deprived and those who had proper rest — were given tests measuring their attention and cognitive skills before and after their respective nights of sleep.

The results showed how poor sleep severely impairs your ability to focus.

One test in particular, where participants have to keep track of a series of steps while also being periodically interrupted, drove this home: participants before their bad night of sleep had about a 15% error rate; the day after they got little sleep, their error rate skyrocketed to 30%. Meanwhile, the respondents who took the test before and after their night of quality recorded about the same score on each test.

In other words: You’re twice as likely to make mental mistakes when you’re not completing the five sleep cycles.

That’s obviously not ideal. Whether you have to give a big presentation at work the next day or simply, like the character on “SNL,” are trying to make a good first impression on your in-laws during the holidays, the odds are against you when you don’t get enough sleep.

I’d like to share a few easy steps you can take to make sure you’re giving yourself the best chance to get a good night’s sleep. We’ve gone over a few of these in the past, but here is a quick look at 3 key things to keep in mind:

1. Plan Your Sleep Schedule

The first thing you have to do is give yourself enough time to complete five sleep cycles.

Your body needs 7.5 hours to complete the five cycles, so make sure you have your wakeup time in mind and work back from there 7.5 hours to figure out when you should be heading to bed. You can use my sleep calculator to determine the best time for you to go to bed so you wake up on time, refreshed.

Taking your chronotype into account is another vital part of setting up your sleep schedule.

Your chronotype is an incredibly important piece of information about your individual preferences for sleep, as well as nearly every aspect of health and performance. Knowing your circadian biotype guides you to the best times to do just about everything, from when you should be going to bed to when the best time is to run a mile or be intimate with your partner. You can find out your chronotype here if you don’t already know it.

2. A Good Mattress Goes a Long Way

As the SNL sketch demonstrated, a bad mattress can ruin your night.

It’s important to think of your bed as you would think of any other piece of performance enhancing equipment. You wouldn’t wear sandals while running a 10K race, so why try and get your 7-8 hours of sleep each night with an uncomfortable mattress?

A comfortable mattress not only feels good but will help you fall asleep quicker. Remember, the goal is to reach REM sleep, or the period during the night where you’re actively dreaming, fast. Completing REM sleep has been connected to better memory processing and improved emotional processing, among other benefits.

I wrote about how to pick a perfect mattress a few months ago, and if one of your resolutions for the new year involves mattress shopping, you may want to check it out. If you’re looking for a cost effective way to upgrade your bed and extend the life of your mattress, a mattress topper could be the way to go. Luma Sleep, is my personal favorite on the market, use the code SleepDoc2019 for a 20% discount on any size Sweet Dreams topper. You may want to pair it with a new pillow as well.

3. Temperature Is Essential

Okay, so you’ve got your sleep schedule down and your bed is in good shape. But to really bring it all together, you’ll want to make sure your bedroom’s temperature is conducive to a good night’s sleep.

Research has shown between 60 and 67 degrees Fahrenheit is ideal for sleep. That might sound a bit chilly, but your body naturally cools down as it’s preparing to go to sleep. Lowering your body temperature makes it easier for you to fall asleep quicker — and get the most out of the sleep schedule you’ve set up.

If you’re not looking to run the air conditioner all night, sleep systems like Chilipad could be a good way to go. It allows you to control your body heat in bed through your sleep cycle — lowering your body temperature in the evening and then warming up as you’re about to wake up in the morning. I’m a big fan of it because it allows two people in the same bed to adjust their temperature independently. And did I mention a colder temperature triggers brown fat? It’s something that helps you burn calories throughout the night.

Keep these three ingredients in mind — a healthy sleep schedule, a comfortable yet supportive bed, and a nice, cool room temperature — and you should feel more refreshed and alert in the morning.

That’s it for this week. Thank you for following along all year, I hope you have a happy New Year celebration. I look forward to sharing even more great ideas for better sleep in the new year!

This post originally appeared on The Sleep Doctor. It is republished with permission.