You’ve booked a perfect getaway, hopped on your flight, checked in to a spacious hotel room ready for that much-needed night of slumber. There’s just one problem: It’s 2 a.m. and you’re still staring at the ceiling. What gives?

With Americans getting an average of 40 percent less than the recommended amount of sleep, you’d think having the chance to stay in luxurious accommodations would be the perfect time to catch some shut-eye. Unfortunately, it can be quite the opposite. “Sleep researchers and clinicians have long known about the ‘first night effect,’” sleep expert Dr. Melisa Moore from the Children’s Hospital of Philadelphia tells Condé Nast Traveler. “The study suggests that one of our brain hemispheres sleeps less deeply the first night in a new environment. This hemispheric difference might cause us to have difficulty falling asleep.”

MORE: The Friendliest and Unfriendliest Cities in the U.S.

According to Moore, we also develop associations between sleep and our environment as babies. It can be things like sleeping facing the door, with multiple soft pillows, with a nightlight, or with a sound machine. When these things are missing in a new place, our brains have to adjust. Even at home, with all of our favorite sleep accessories, we wake between four and six times. In a hotel, though, it takes a little longer to get back to sleep.

More From Conde Nast Traveler

“After every sleep cycle, our brains briefly wake up, and generally, we are so good at getting ourselves back to sleep that we don’t notice,” adds Moore. “If what we have at bedtime—two pillows, TV, sound machine etc.—isn’t there when we wake up, it may be more difficult to return to sleep.”

Though it seems like the odds are against you when it comes to getting a good night’s sleep in a hotel room, there are a number of things you can do to secure some sweet dreams. “Try to wake in the morning in your new destination rather than sleeping in, and get as much sunlight as possible first thing by going outside or opening the shades in your room,” says Moore. She also suggests eating at the regular meal times in your new time zone.

Next, keep things as close to home as you reasonably can. “Some people stay in the same hotel chains or bring their own pillows or pajamas,” she says. “There are white-noise apps for smartphones or even travel-sized sound machines that can help. Keep the environment consistent throughout the night. For example, don’t have your sound machine app turn off after four hours.”

There are also a couple of things to stay away from if you want to get some R&R in your hotel room. “Avoid caffeine from late afternoon until bedtime,” says Moore, “and avoid electronics about an hour before bed.” Why? Blame science: Electronics (specifically, the blue wavelength of light) temporarily suspend the secretion of melatonin in the brain, and we need melatonin to feel tired at bedtime and to stay asleep during the night. So, resist the urge to grab your phone when you can’t sleep—or caffeine when you’re feeling jet-lagged.

Some hotels have even made this process easier for travelers. The Ritz-Carlton, Dallas started a new initiative called "A Good Night’s Suite" where you can request in-suite amenities like noise-canceling ear plugs, a herbal or unscented eye mask, optional cool-temp pillow, sleep-inducing herbal tea, lavender linen mister, and a CD of soothing music. The MGM Grand Hotel & Casino in Las Vegas has Stay Well rooms featuring air purification systems, and The Hermitage Hotel in Nashville now has a pillow menu. Now that's REM—er, room—service.

MORE: 6 Travel Upgrades You Should Make for Your Health