When Geraint Thomas packed his bags for the Tour de France this year, he didn’t just take a boatload of spandex. He also packed his pillow. How quaint.

It’s not news that the best athletes in the world spend just about every waking moment thinking about performance. Everything from what they eat to how they train and where they live can make the minute difference between sporting immortality and mediocrity. What we often don’t consider, is how the time they’re asleep might also make a difference. When every second counts, making the most of the 8-12 hours you’re in bed every night makes sense. That’s why Thomas packed his pillow (along with sheets and a mattress) on his way to winning the Tour de France.

Sleeping is, literally, the last thing many of us think about, and that is especially true when it comes to performance. But, as Suraj Achar, professor of Family Medicine at UC San Diego and practicing doctor of Sports Medicine told me, “Sleep is directly correlated with performance.” Whilst mere mortals might get by on six hours a night, Lebron James and Lionel Messi reportedly count on twice that. Not all of us can spend 50 percent of our lives napping, but we would probably perform better if we did.

A few hours of extra sleep might not have the entire Camp Nou singing your name, but it can make a huge difference in athletic performance. Research conducted at Stanford University shows that, when students on the Stanford University men’s varsity basketball team had a minimum goal of ten hours in bed each night, free throw and field goal percentages both increased by nine percent. They also decreased their 282-foot sprint time from 16.2 seconds to 15.5 seconds. Achar told us that a lack of sleep can result in increased reaction time, decreased sprint performance, decreased glycogen storage and a higher risk of injury. In studies on doctors working long shifts, staying up for 18 hours has shown similar detrimental impacts to being legally drunk. Multiple studies also show that a lack of sleep leads to poor diet choices and weight gain. In short, being tired is for losers.

Sleep benefits are not just short-term either. Achar described a “sleep debt” that can be built up over one or two weeks, resulting in a gradually decreasing performance. Over time, this sleep debt can result in higher rates of injury and decreased performance. Knowing this allowed the US Olympic team in Rio to book swimmers into two entire floors of a hotel where they could sleep until the late afternoon in order to recover from late races and post-race ceremonies that often had them in bed as late as 3 AM. This meant that over several days of competition their relative performance improved against their sleep-deprived competition.

Unhealthy sleep habits can also shorten careers. One survey showed that MLB players who got the least sleep were nearly half as likely as those who got the most to remain in the league over a five-year period. Combine this with the weight gain and likelihood of repetitive strain injuries associated with sleep deprivation, and you have a recipe for early retirement.

So, how can we manipulate sleep for performance gains?

It’s not just how much you sleep that makes a difference, but also when. We seem to peak in the late afternoon. When we wake, our bodies produce a surge of the stress hormone Cortisol (Achar told us this is why more cardiac incidents occur in the morning). After this, we become gradually more alert during the day before beginning to tire in the early evening and winding down for bed. Knowing this allows athletes to manipulate their sleep cycles to improve performance, it’s why west coast teams in the NBA, NFL and MLB all perform better than statistics would predict when playing evening games on the east coast. Players from western states are playing at what is, for their bodies, mid-afternoon whereas east coast natives lining up at eight at night are already past their peak for the day. MLB teams now use nap rooms to optimize the time from waking to walking out onto the pitch for a game.

If sleep can make you faster, more skilled, less injury prone and smarter, it stands to reason that you’d want to get the best sleep possible. For many of us, habits are hard to break and we struggle to remember what a really good rest feels like. The problem, Dr. Roy Raymann, Resident Sleep Expert and Vice President of Sleep Science & Scientific Affairs at SleepScore Labs told me, is that that “you might think that you are on top of your game when you are actually being sleep deprived. In retrospect, it is like thinking you are able to drive a car after a couple of drinks. We counteract the signs of sleepiness by using lots of coffee and energy drinks.” It’s easy to deny that your sleep is problematic, indeed I never thought mine was, but in the never-ending search for improved mediocrity, I decided to make some changes of my own.

The most obvious sleep problem for many of us is setting aside enough time for sleep. Raymann suggests developing and sticking to a routine for this. I found that using smart plugs (but you could also do this with an old-fashioned timer) to schedule my television, wi-fi router and living room lights to shut off at 9 pm helped. This meant I had to make a real effort to “just watch another episode” of whatever I was binging on Netflix or, yet again, try to persuade someone’s uncle on Facebook that Pizzagate wasn’t real when I should have been in bed. I found that, even when I thought I wasn’t ready for bed, 30 minutes reading a (paper) book in my bedroom left me feeling relaxed and ready to sleep.

Not only should you try and be in bed by a certain time, but you should also limit your exposure to screens, alcohol and caffeine in the hours leading up to bedtime to ensure that the time you spend in bed results in the best quality rest. Achar explained that there are several stages of sleep, and that we do our best recovery in the deepest stages. The light and stimulation we get from the alerts and screens on our mobile devices can prevent us from sleeping deeply, especially if we charge them on our bedside tables. Unfortunately, consumption of alcohol or caffeine before bed, or really after noon, can also prevent the body from going into deep sleep cycles and inhibit recovery. Achar, therefore, suggests leaving your phone out of the bedroom, no caffeine after lunch, and some medically-sanctioned day drinking, for peak performance obviously.

Finally, the sleep environment is important. If you are uncomfortable, overheating or poorly supported by your bedding, you will probably wake up in the night and not benefit from deeper sleep. Sleep scientist, Dr. Lorenzo Turicchia says many athletes could benefit from improving their bedding. “If you have proper support and are not overheating,” Truricchhia says, “you are less likely to toss and turn, which allows your body to focus on recovering instead of trying to get comfortable.” He suggests a mattress and pillow designed to work together as well as sleeping in breathable fabrics that prevent overheating disrupting your rest. What you sleep on (think sheets) can make a difference as well. As a guideline, if you find you sleep better at hotels, it might be time to look at replacing your mattress or pillows.

Given the performance and health benefits of good sleep, it’s no surprise that dozens of sleep tracking devices have popped up to allow interested consumers to quantify their sleep as they do everything from food intake to steps taken. These broadly fall into three categories, cell phone apps, wearables and non-wearable devices. Non-wearables range from the equipment used in laboratories to simple under-mattress pads. They might work well if you only ever sleep at home, but I can’t see myself packing a magnetic undersheet on my next work trip when I’m already the sort of guy who has two toothbrushes so one never leaves his dopp kit.

Cell phone apps are certainly the cheapest option for sleep tracking, but none of the apps I tested yielded useful data. One was convinced I got out of bed 12 times at night. After a period of panic in which my partner and I both doubted our recollections of a perfectly normal night’s sleep, we managed to establish that this was my cat passing the sensor and not some kind of chronic somnambulance. One also has to make sure to turn on the app, which involves interacting with your phone right before bed, which is almost universally seen as a bad idea by experts.

I took Achar’s advice and left my phone charging outside of my bedroom and turned instead to a wearable device. If you’re looking to track sleep, it’s important to remember that any device you have to remove to charge isn’t going to be that useful. You’ll likely charge it at night, miss out on some data and end up giving up on the whole process.

I turned to Whoop, a wearable device that doesn’t have a screen to disturb my rest, charges while you wear it and uses metrics like heart rate, heart rate variability and body temperature to establish the duration and quality of sleep. It also works as an exercise tracker, giving an estimate of a day’s stress on the body and recommending an appropriate amount of sleep. I found that I could correlate the results of my Whoop sleep score with my performance and, as I began to implement better sleep practices, both my “recovery score” on the app and my workouts did notably improve. Achar estimated that Whoop’s product is likely 80 percent as accurate as the equipment in his laboratory, but it can certainly point users in the right direction.

In my N-of-1 trial, I found it fascinating to look at how a couple of beers, or a dinner consumed too close to bedtime, disrupted my sleep, increased my heart rate and ultimately harmed my recovery. It’s not that I didn’t already know some of these things would happen, so much as that having a reminder the next day of why I was struggling in my workout reinforced the negative impact of poor sleep habits. I found that, when combined with a decent journal and the in-app questionnaire about sleep and diet, Whoop’s sleep analysis helped me do away with what had always been “mystery” bad days. It’s not that I didn’t have bad days, but at least I knew what caused them.

After a few weeks of my improved sleep protocol, I certainly feel that my recovery has improved, and I am just fine without my mid-afternoon espresso. I’ve even noticed myself making fewer sneaky trips to the fridge after dinner. Using the Whoop system to make myself more accountable for sleep and recovery seems to have allowed me to workout harder — although any potential attractiveness benefit that conveys may well be offset by my insistence on sleeping in a rather fetching patterned sleep mask.

Sleep isn’t really something we enjoy, but the results of sleeping well certainly are. The great thing about sleep is that it’s free and everyone can do it. In a market crowded with expensive supplements, extreme workouts and overpriced sneakers, the best thing you can do for your performance might be your pillow. So next time you’re looking to bag that local KOM, turn off your phone, stop checking your Strava and just go to sleep.

Kusa 160 by Cotopaxi $150

Custom-Molded Ear Plugs by Decibullz $26

Sleep Tracker by Whoop $30/month

SleepScore by SleepScore Labs Free

Pillow ID by BedGear $199