When people would ask if I had any hobbies, I used to reply, “Just one: Napping.” But this year that turned out not to be a joke.

Every day after work, instead of spending time with my family, I’d take a two-hour nap. Even then, I’d still be exhausted, so I’d sleep late on Saturday and take as many naps as I could on the weekend. That only made it worse. I was so constantly fatigued that my wife wanted me to see a doctor to determine whether I had an undiagnosed condition like seasonal affective disorder (SAD), or winter depression.

I didn’t need a physician, though, to tell me what I had was a chronic history of poor sleep habits. When I was younger I could often get by (with sufficient doses of caffeine), but now I could no longer ignore the problem.

My poor sleep hygiene was affecting my family, my work, and my physical health. And it was also affecting me spiritually.

Sleep as Spiritual Discipline

In the Psalms, David shows that peaceful sleep is an act of trust and a sign of humility. “I lie down and sleep,” David said, “I wake again, because the Lord sustains me” (Ps 3:5–6). He also said, “In peace I will lie down and sleep, for you alone, Lord, make me dwell in safety” (Ps 4:8).  Getting a good night’s rest shows that we know God is in control and will watch over us when we are at our most vulnerable.

Sleep is a sign of trust and humility. But it’s also a spiritual discipline. As D. A. Carson says,

Sometimes the godliest thing you can do in the universe is get a good night’s sleep—not pray all night, but sleep. I’m certainly not denying that there may be a place for praying all night; I’m merely insisting that in the normal course of things, spiritual discipline obligates you get the sleep your body need.

Like most spiritual disciplines, to be most effective sleep requires both a change in attitude and a change in habits. Here are a few things I learned and practical steps I’ve taken to better develop the spiritual activity of rest:

Get enough sleep — There are a number of factors that affect the quality of your rest, the most important being how long you sleep each night.

The amount of sleep a person needs varies from individual to individual and changes over the course of their lifetime. But if you’re like most people, chances are you’re not getting adequate sleep to be fully rested.

Here is the average number of hours of sleep, based on age, a person needs every day:

6 to 13 years of age: 9 to 11 hours

14 to 17 years of age: 8 to 10 hours

18 to 25 years of age: 7 to 9 hours

26 to 64 years of age: 7 to 9 hours

65 and older: 7 to 8 hours

The amount of sleep you need is largely due to your genetic makeup—it’s out of your control. Statistically speaking, you’re likely not in the group who can get away with less sleep. So stop kidding yourself into thinking you can function with less and schedule the amount of sleep you really need.

Avoid blue light at night — Your body has a natural clock, known as its circadian rhythm, that affects when you fall asleep and when you wake up. It’s your circadian rhythm that tells your body when to produce the hormone melatonin. Melatonin levels begin to rise in the mid- to late evening, to prepare you for sleep. The levels remain high for most of the night, and then drop in the early morning hours, just before waking.

One factor that can disrupt melatonin levels is light, especially light in the blue wavelength region of the spectrum. As Harvard University neuroscientist Anne-Marie Chan explains, “Past studies have shown that light suppresses melatonin, such that light in the early evening causes a circadian delay, or resets the clock to a later schedule; and light in the early morning causes a circadian advancement, or resets the clock to an earlier schedule.”

Guess what sends a lot of blue-light directly into your eyes and to your brain? That’s right, all the devices you love to use before bedtime: smartphones and tablets, laptops and televisions. When you use those blue-light emitting electronics before bedtime, your brain gets the message, “Turn off the melatonin, the sun is rising and it’s time to wake up!”

The obvious fix would be to avoid using those devices before bedtime. But that’s not always an option. Fortunately, there are a couple of things you can do limit your exposure.

If you use a laptop or desktop computer at night, download and add the free software f.lux. This program makes the color of your computer’s display adapt to the time of day, warm at night and like sunlight during the day.

A more broad-based solution is to use blue-light blocking safety glasses. Whenever I’m in bed and watching TV or reading my iPad, I wear a pair of Uvex S1933X Skyper Safety Eyewear. They are cheap ($8.52 from Amazon) and relatively comfortable. Because they filter out blue colors, they can change the color of your screen if you’re watching television. But they are one of the best sleep tools I’ve found.

(Isn’t it a bit silly to be wearing safety goggles in bed? Yes. Yes, it is. But I’m not going to stop reading books on my iPad at bedtime, so having people make fun of me is a small price to pay.)

Block out the other light too — Unfortunately, blue light is not the only light that will affect your melatonin levels. The light coming in from you bedroom from outside—streetlamps, car lights, the moon—can also affect your sleep. Ideally, your room needs to be as dark as possible, which is why you should consider adding blackout curtains to your windows. They are relatively inexpensive and can be found both online or at any retail store that sells curtains, shades, and drapes. Choose one that has the highest blocking potential, preferably at least 99.9 percent of light and 100 percent of UV rays

If blackout curtains aren’t an option, consider wearing a sleep mask. The cheap ones (like you get on airplanes) are rarely comfortable or effective, so it’s worth it to buy one that fits properly. The best one I’ve found is the Sleep Master Sleep Mask. It covers the eyes completely and has a Velcro strap that makes it fit firmly (which is helpful when you have a basketball-sized head like mine). At $25.90, it’s a bit pricey.  But it can last you for decades and will pay for itself within a month of restful nights. (One drawback is that it’s made of satin, a material that doesn’t breathe well. This can make your head warmer than normal, so it’s not recommended if your bedroom is hot and humid.)

Keep Your Cool — When it comes to sleep, temperature matters. As a rule of thumb, you want your head to be cool (that’s why you’re always looking for the cool side of the pillow) and your body relatively warm. (If you suffer from “hot head,” you may want to try using a cooling pillow or a cooling cap. I haven’t tried either so I don’t know what products to suggest.)

You can usually achieve both states by setting your room temperature at 65 degrees (though I prefer 60). If that sounds too cool for comfort, keep in mind that with pajamas, a sheet, and a blanket, your skin temperature is likely to be in the 90-degree range even if your room is only 65 degrees.

Get the best bedding you can afford — While a basic model car may be adequate for our daily commute, many Americans will spend tens of thousands of dollars extra for comfort (e.g., plushier seats, more headroom). These same people, though, often grouse at the idea of spending even a few hundred dollars on a quality mattress, bedding, or pillows—even though they spend four times as much time in their beds as their vehicles.

Not everyone can afford Egyptian cotton, and costlier doesn’t necessarily mean better quality (forget what you’ve heard about “thread count”). But if you have disposable income to spend on non-essential goods, invest in your bedding. At the very least, save your pennies and buy a top-of-the line pillow. (I saved my allowance and I got a Palais Royale™ Pinnacle Goose Down Side Sleeper for $65 on clearance. Money well spent.)

Put a time limit on the alcohol and caffeine — Alcohol can disrupt your sleep patterns so avoid drinking it too late in the evening. I don’t drink alcohol myself, but I more than make up for it in my consumption of Diet Coke. I used to drink Diet Coke from morning until evening, and wouldn’t think twice about drinking it at midnight (though I tried to refrain from consuming it after 2:30 a.m.).

For some reason I had convinced myself that the caffeine I consumed would be “out of my system” within 30 minutes of drinking it. I was wrong—very wrong. As Travis Bradberry explains,

Caffeine has a six-hour half-life, which means it takes a full 24 hours to work its way out of your system. Have a cup of joe at 8 a.m., and you’ll still have 25 percent of the caffeine in your body at 8 p.m. Anything you drink after noon will still be at 50 percent strength at bedtime. Any caffeine in your bloodstream—with the negative effects increasing with the dose—makes it harder to fall asleep.

I was constantly adding caffeine to my system—including before napping and within an hour of going to sleep at night. No wonder I couldn’t rest!

Nowadays, I’ve stopped drinking caffeine after 2 or 3 pm. It’s not a perfect solution, but it’s a start.

Plan to go to bed and wake up at a regular time — For most of my adult life, my “bedtime” was whatever time it was when my I was too exhausted to do work/watch movies/read books, and so on. My wake-up time, though, was relatively consistent since it depended on when I had to be at work. You can see how that math wouldn’t work out.

I would tell myself that I could “catch up” by sleeping late on Saturdays. But that only made it worse since our circadian clocks do not have a setting marked “Weekend.” All I was doing was throwing my sleep patterns further out of whack and creating the same effect on my body as having jet lag.

Nowadays I have a set time to go to bed and a set time to wake up that is consistent throughout the week. It wasn’t easy, but I found the time restriction forces me to prioritize my time better so that I’m not merely staying up till 4 a.m. checking Facebook or binge-watching shows on Netflix.

You Know This Stuff; Just Do It Already

Chances are that you know about many or all of these ideas already. I did too. But as Samuel Johnson once said, “People need to be reminded more often than they need to be instructed.” Take this as a reminder to try some (or preferably all) of these tips in order to improve your bedtime habits.

Show God you trust him and are a good steward of his resources by deciding to do more to get a good night’s sleep.