On a recent episode of podcast " The Tim Ferriss Show ," James explained, "that's the best way for your body to physically and emotionally be able to recover and get back to 100 percent as possible. Now, will you wake up and feel 100 percent? There are some days you don't. So some days you feel better than others. But the more, and more, and more time that you get those eight – if you can get nine, that's amazing."

What's the key to the 16-season veteran's success? At least eight hours of sleep, every night.

LeBron James is one of the best athletes on the planet, with three NBA championship rings and four MVP awards .

James, who says he sometimes even gets 10 hours of sleep, says that if he doesn't get a enough rest, then he'll often take a one to two hour break from his day to sneak in a nap.

His trainer, Mike Mancias, agrees that sleep should be a priority, and says he even has a few tricks to ensure that James gets the rest he needs.

"Without giving everybody all of our secrets, No. 1 is be very, very comfortable in that room," he says. "Create an environment. For LeBron, it's always in his hotel room, making sure the temperature's set at a particular – probably 68 to 70 degrees is probably optimal."

Mancias said that complete darkness — no television or smartphone light — is also key. "Just turn everything off probably a half hour to 45 minutes before you actually want to go to sleep, and just really committing yourself to that," he says.

In addition to having a dark room at a comfortable temperature, James also revealed that he uses the Calm sleep app to help him rest peacefully. "I'm the guy who picks 'rain on leaves,'" he says. "That's what goes on on my phone throughout the night."

James isn't the only top athlete who relies on a good night's rest to perform at his best. Earlier this year, NFL star Rob Gronkowski told CNBC Make It that he sticks to a strict routine that includes getting at least seven hours of sleep each night.

"You've gotta have a routine to get your mind and body set so that it's always ready to go when you need it to go," he says. "I usually like to get to bed around a decent time between 11 and 12 at night. And I get about seven to nine hours of sleep every night and I wake up and start my day from there. I get going by staying active throughout the whole day and getting a workout in."

James, who remains active in the off-season, says that regardless of how much training he does, nothing compares to getting a proper amount of rest.

"I could do all the ice bags and the NormaTecs and everything that we do, that we have as far as our recovery package, while I'm up," he says. "But when you get in that good sleep, you just wake up, and you feel fresh. You don't need an alarm clock. You just feel like, 'Okay. I can tackle this day at the highest level.'"

Like this story? Subscribe to CNBC Make It on YouTube!

Don't miss: Rob Gronkowski gets 7 to 9 hours of sleep each night—here's the rest of his routine