It’s 4 a.m. and you’re still awake. AGAIN. If you have a tough time drifting off or if you’ve noticed that you’re routinely up in the middle of the night with little hope of falling back asleep, adding some white noise could be the solution. But does white noise for sleep actually work? Let’s investigate.

What exactly is white noise?

White noise is a consistent mid-level sound that lives at a volume somewhere between faint background sounds (like a car alarm going off in the distance) and a very loud noise (like a hardcover book slamming onto a wooden floor). “White noise is volume that remains constant and represents all the sound frequencies our ears can hear,” explains sleep scientist Tara Youngblood, cofounder of Chili Sleep Systems and author of Reprogram Your Sleep.

Basically, white noise incorporates this whole range all at the same time, so it can dampen other sounds you might otherwise hear on that spectrum. When not manufactured by a sound machine (we’ll get to those in a bit), white noise can be something like the whir of an oscillating fan or the hum of an air conditioner—but it isn’t, no matter what your partner says, the sound of snoring. (White noise is also slightly different from pink noise, its quieter, strictly natural cousin.)

Can white noise help me sleep?

For people who have a tough time falling asleep and have run out of sheep to count, Youngblood says that white noise is a godsend because it acts as a muffler for background noise and helps drown out the louder sounds to help them both fall asleep and stay asleep. In fact, a 2004 study in the journal Sleep Medicine discovered that patients exposed to white noise slept better because white noise effectively hides “background noise” and other “peak noises.”

Adding white noise into your bedtime routine is a huge step in the right direction, but you should also avoid screens, caffeine and alcohol for at least two hours before bed, keep your bedroom cool and make sure your bed is cozy and conducive to sleep, Youngblood adds.

How do I use white noise to help me sleep?

There are a few things to consider when incorporating white noise into your nighttime ritual. First, you need to figure out which white noise is best for you. This can be tricky if you share your bedroom with a partner. “Individual needs and preferences play a large role in sensitivity to things like noise in the bedroom,” Youngblood tells us. But finding the right white noise can be a process of trial and error even if you have your bed all to yourself. In either situation, buying a white noise machine with lots of settings to try can be helpful.

Depending on the machine—and your own personal preference—you can keep the white noise playing all night or set a timer to turn it off. It doesn’t matter which sound you use, as long as you find it soothing. You can go all natural and pick running water, crickets, wind, rain or the beach. Or you may prefer an ambient sound, like the static from a TV or a dryer humming.

OK, I’m sold. Which white noise machine should I get?

Want to get a white noise machine that’s beloved by reviewers? Check out the brand Hatch, which makes white noise machines specifically for babies, but adults can use them too. At just four inches wide and two inches tall, the LectroFan High Fidelity White Noise Machine by Adaptive Sound Technologies is ideal for teeny spaces, and the Dohm Classic by Marpac is great for anyone looking for a simple and reliable design. This OG has been around since 1962.

You can also easily program white noise using Google Nest or Amazon Alexa. That said, you might want to think twice about asking Alexa to help you drift off if you’re a sleep talker—you could end up with your entire Amazon wish list at the front door two days later.

RELATED: How to Sleep on a Plane: 13 Tips for Your Next Flight, According to a Sleep Expert

Shop White Noise Machines

Marpac Dohm Classic $42

Hatch Rest+ $90

Adaptive Sound Technologies LectroFan High Fidelity $50