Given that humans are the only mammals who willingly delay sleep, it’s no surprise that so many of us lie awake in bed at night. But don’t think you’re the only person tossing and turning at night—the fact is that sleeplessness is on the rise.

A study conducted in eight developing countries—India, Ghana, Tanzania, South Africa, Bangladesh, Vietnam, Kenya and Indonesia—concluded that about 150 million people suffer from sleep-related problems. The study was published in the journal Sleep in 2012. In her book The Sleep Revolution—Transforming Your Life, One Night At A Time, Arianna Huffington says we’re in the middle of a sleep deprivation crisis: Lack of sleep is affecting our jobs, relationships, happiness, even sex. “The prevalence of sleep apnoea is almost as much as the prevalence of diabetes and asthma put together in several countries," says M.S. Kanwar, senior consultant (respiratory, critical care and sleep medicine) and founder of the Apollo Sleep Disorder Institute at Apollo Hospital, New Delhi. This condition, he says, does not allow for a deep stage of sleep owing to repeated electric activity in the brain. If you’re in bed for 8 hours and still feel groggy and tired the next day, it could be a sign of sleep apnoea. You should see a somnologist, or sleep doctor.

Some people think a nightcap is the ideal before-bed routine, but while a drink may lull you into a more relaxed state, it will prevent you from reaching that deep REM state. A 2013 study, published in the journal Alcoholism: Clinical And Experimental Research, found that you’re more likely to wake up in the middle of the night and not feel rested the next day if you have a drink or two beforehand.

Experts suggest that a good night’s sleep averages around 7-7.5 hours. “But some people may feel refreshed after 6 hours and others may feel drowsy even after 8," points out Dr Kanwar. Eventually, only you can decide how many hours you need to feel fresh. That said, getting your 40 winks doesn’t involve a complex mathematical equation. Like all healthy habits, sleep too must be habituated with discipline and consistency.

Ensure good sleep hygiene

This is of utmost importance. Decide a time to sleep and delay it no more than 15 minutes, even on weekends. Keep a 2-hour gap between dinner and bedtime, and a 4- to 5-hour gap for caffeinated drinks.

Then create the right environment. Your bedroom must be dark and devoid of noise and distractions, advises Dr Kanwar. “Use the bedroom only for sleep and not for work, eating or watching movies," says Sayantani Mukherjee, consultant psychiatrist at the Columbia Asia Hospital in Pune. Never turn your bed into a hub of activity; when you look at your bed, you must associate it only with sleep. She suggests a calming down routine an hour before bed—a hot shower, relaxing music, reading, but no stimulatory activities such as looking at a bright screen 2 hours beforehand. 

Correct your posture

A bad sleeping posture can lead to sprains in the neck, thumb and wrist, which can also lead to poor sleep quality. But first, sort out the basics. “The mattress should not be too hard or too soft and the pillow should not be more than 4 inches thick," says Chitra Kataria, chief (rehabilitation services) at the Indian Spinal Injuries Centre in Delhi. Ensure that your pillow supports both your neck and head and never use two or three under the head. “If you have a habit of sleeping on your stomach, change it because this position twists the spine," says Dr Kataria. Try to sleep on the side with a pillow between the knees and one on each side of the torso for extra comfort. Pillows can also be used if you have a bad back or your feet hurt. Keep a pillow under your knees while lying down straight to ease a tight lower back, or prop your feet up on two pillows if they hurt from walking around all day. 

Resolve worries before bed

A common cause of sleeplessness is worrying about things you cannot control. Dr Kanwar suggests making a journal of thoughts every night before sleeping. “Usually, the subjects are planning, work pressure and vacations—so take half an hour to write solutions and go to bed with an empty mind," he says. In his experience, after a few weeks of this activity, patients realize they are thinking about the same issues over and over again, so while the thoughts may still come to them, they won’t stick. 

Control your mind

Getting enough shut-eye is a question of mind over matter. But how can you control the brain jumping from one thought to another? A study conducted in 2015 by the University of Southern California, US, involved two sets of people who had trouble sleeping—half utilized mindfulness meditation while the other group did sleep-education classes. Six sessions later, the researchers found that the meditators had better quality of sleep, less fatigue and depression. In mindful meditation, a person disconnects from thoughts, bringing the attention back again and again to focus on breathing and the present moment.

All the experts quoted in this story agree that yoga and meditation are the best tools to counter sleeplessness. If mindful meditation tends to bore, you can try a guided meditation such as yoga nidra that is best done lying down in bed. Try, which has over 3,500 online yoga and meditation classes (free for 15 days and then $18, around Rs1,200, a month) ranging in duration from 10 minutes to 2 hours.

In this perpetually connected world, we expend most of our energy on chasing deadlines. But when we do it at the cost of sleep, it’s high on the law of diminishing returns.