When flying, most of us are traveling in a tightly packed economy cabin surrounded by people talking, laughing, complaining, sneezing, and eating. Babies are crying, flight personnel push drink carts down the narrow aisles, and passersby cause traffic jams.If you dare to sleep at all, sitting in the aisle seat means being jostled at any time throughout the flight, from people walking or row mates heading to the bathroom.Rick Steves, the indomitable travel writer and guide, described his travel routine in an email: “I dress warm and loose for flights and cuddle up with my sweater and scarf. Next, I slip on my noise-canceling headphones, which both mute the rumble of the engines and the mind-numbing chatter of people around me.”The right preparations can help travelers doze off. From an in-flight cocktail to neck support, here’s what to avoid and what to bring to get a few hours’ sleep on a plane.Coping with stuffy air and ear-rattling noiseThe physical limitations of sleeping are joined by a host of other in-flight demons. The humidity in the passenger cabin is low and the resulting dry air can irritate the eyes and nose. Air pressure is also lower, which can trigger headaches and nausea, neither conducive for nodding off. Some people can experience the unsettling feeling of altitude sickness when the plane hits 4,500 feet, about 10 minutes into the flight.The temperature in a passenger cabin fluctuates between 71°F to 75°F. For some, it’s too hot, for others, too cold. According to sleep experts, the optimum temperature for a good sleep is between 65°F and 68°F. Depending on the length of your flight, you may need a blanket— or a hand fan.(Explore our favorite products for sleeping soundly on a plane.)Then there’s the noise. The plane itself at cruising level generates 85 decibels (dBA)—not good for the ears and certainly not soothing for sleep.According to the American Speech-Language-Hearing Association, you can listen to sounds of 70 dBA (washing machine) or lower “for as long as you want” and not damage hearing. But “sounds at 85 dBA can lead to hearing loss if you listen to them for more than 8 hours at a time.”Carla Jaspers, an occupational therapist and ergonomic specialist, urges flyers to use noise canceling headphones or earplugs “to block out excess noise either from the aircraft itself or from people on the flight.”Picking the right seat and sleeping positionAmong Jasper’s travel suggestions, avoid using the drop-down tray table as a head rest. The position irritates the skin and can lead to pinched nerves and numbness.A seat that reclines even a bit relieves the pressure on your back and spine—and invest in an ergonomically correct pillow for the neck and head and one for your tail bone. The more support you give your head and neck, she says, the better chance of having a restful sleep.If you haven’t flown lately, you may find settling into a comfortable sleeping position more difficult than it used to be. To accommodate additional seats to pack in more people, the industry-determined seat size has been reduced from 18.5 inches armrest-to-armrest to 17 inches.Leg room, or “pitch,” is down from 35 inches to 31 inches. And if you dare in economy class to use the controversial reclining feature, it goes back two inches from the previous four inches, which is helpful for people sitting behind you but a minimal advantage for snoozing. You May Also LikeThe irony is that studies show that while airplane seats are “the most significant comfort factor when it comes to sleeping” and sleeping is the “most common activity” on a long plane trip, it’s also the least comfortable.”Considering these challenges, is there really a way to fly and sleep at the same time? Yes, said Jamie Zeitzer, a professor and co-director of the Center for Sleep and Circadian Sciences at Stanford University. “Fly business class . . . For the rest of us, it is not so easy.” You have two choices if sleep is your goal. As Zeitzer suggests, spend more money for better seats, including those in premium economy. They retain the recently replaced roomier seats.Or choose your seats in advance. The question is “which seat”?First, choose a seat far from the lavatories. The aisle seat is busier. The middle is stiff and stuffy, and Jaspers gives it a thumbs down. The window is prime for resting the head but it’s also inconvenient, snug, and potentially claustrophobic.The emergency “bulkhead” rows offer the leg room, but the seats may not recline, and it is a popular spot for moms with babies and gear. You also have to be alert if something goes wrong during the flight.Still, choosing your own seat gives you agency. Most airlines allow you to pick your seat, but it might take some scrolling through the website. Flight service sites like SeatGuru do the work for you with layouts of the major airline cabins, dimensions of the seats in the three cabin classes and other details, plus handy user comments about individual seats and location.Medication and sleep aids”There are many things that can disrupt sleep,” says Zeitzer, who is researching blinking light as a solution for jet lag.And there are many ways to cope, he says. Like packing a comforter for chilly cabins and sleep masks when the light — from the windows or a seat mate’s overhead bulb — interfere with shut-eye.(Drinking on a plane has a unique effect on the body. Here’s how.)Regular flyers and the 40 percent of Americans who have aviophobia, or fear of flying, often call on anti-anxiety medications such Xanax and Ambien, both prescribed by physicians. Seasoned flyers like Steves swear by the latter. “I admit to loving my Ambien,” he says. “Just a third of a tablet is good for me for a couple of blissful hours of sleep.”Some flyers are partial to melatonin, which isn’t a sedative. Sold over the counter, it is a hormone involved in the sleep-wake process, not insomnia. One cautionary tip is to use melatonin for trips longer than six hours—the time it takes for the calming dose to pass through your system—so you don’t arrive at your destination groggy.Finally, stay hydrated. Alcohol is dehydrating and can interrupt REM sleep, and anything containing cannabis is illegal on flights originating or flying within the United States. Alternatively to medications, Zeitzer suggests pre-sleep relaxation techniques, like “meditation, progressive muscle relaxation, music, reading.” Or, he adds, “take off your shoes—no stinky feet, of course—as this helps you to dissipate heat, which is a critical part of falling asleep.”