During the 20 years he spent building Microsoft into one of the world's largest and most successful companies, Bill Gates was an obsessive workaholic and taskmaster. During those days, he "didn't believe in weekends, [and] didn't believe in vacations.

And he also didn't believe very much in sleep. 

"I routinely pulled all-nighters when we had to deliver a piece of software. Once or twice, I stayed up two nights in a row," he admitted in a blog post in December. "I was obsessed with my work, and I felt that sleeping a lot was lazy."

As Gates celebrated 20 years of his second act (global philanthropy), he has the zeal of a convert when it comes to sleep.

"Now that I've read Matthew Walker's Why We Sleep, I realize that my all-nighters, combined with almost never getting eight hours of sleep, took a big toll," Gates wrote. 

Here are some of the key tips Gates cites for improving what he calls sleep hygiene.

Replace any LED lights where you sleep.

"They emit the most sleep-corroding blue light," Gates wrote. Of course, keeping any lights on at night will reduce melatonin, which the body produces to help you sleep. But, Harvard researchers found blue light--which also lights up smartphones and tablets--is the worst offender in reducing that melatonin you need to get shuteye. 

Keep it cool.

"If you're fortunate enough to be able to control the temperature where you live, set your bedroom to drop to 65 degrees at the time you intend to go to sleep," Gates said. If you're always cold, and shudder at the thought of a cold room, try wearing socks to bed. Research shows that keeping your feet warm can help you fall asleep faster and stay asleep longer. 

Limit your alcohol.

Alcohol might help you fall asleep, but it suppresses the ability to reach the most important REM sleep or deep sleep. It may also impact your business, since the research also shows you will likely be less alert and less efficient the next day, when you're back in the grind trying to grow your company.

Take short naps, and start early.

Do what our human ancestors did (and what some cultures still do), and take midday naps. "It will likely improve your creativity and coronary health, as well as extend your lifetime," Gates noted. Mayo Clinic recommends keeping naps short--just 10 or 20 minutes--and make sure you get them in before 3 p.m. or it can affect the sleep you get at night.

"Does everyone really need seven or eight hours of sleep a night?" Gates asked rhetorically. "The answer is that you almost certainly do, even if you've convinced yourself otherwise." 

Ironically, Gates said it took him longer than usual to get through the book Why We Sleep because he kept following its author's advice: putting down the e-book earlier at night than he otherwise might, so he could get enough sleep.