There is no literary figure I envy more or relate to less than Rip Van Winkle. Who drifts off to sleep that easily and actually stays asleep for so long? I understand his story is fictional, but that simple fact doesn’t make me hate him any less. I’ve struggled with sleep for half a decade now—Rip could have slept through that whole time plus 15 more years.

In the beginning, I’d lie tossing and turning in bed for hours, counting an endless queue of sheep. I replaced sheep with counting sleep aids about five years ago. One Ambien, two doses of melatonin, three Advil PM tablets, four glasses of chamomile tea. These methods worked temporarily, but they all gradually lost their power. I found myself taking more and more supplements to get a solid six hours of sleep. I was on a quest for the magic elixir to treat my symptoms rather than attempting to address underlying causes for my self-inflicted insomnia.

Still, I worried about the effects that these sleep aids were having on my health. I hadn’t been diagnosed with any condition by a doctor, but rather had taken the situation into my own hands. Why did these chemical solutions temporarily work, but then seem to exacerbate the issue? Dr. Michael Grandner of the American Academy of Sleep Medicine explained that, “In the short term, prescription sleeping medications can make sleep shallower and less restorative. They may reduce the time you are awake during the night, but they don’t really increase the amount of time you sleep by very much.” In fact, the National Institutes for Health conducted a study in 2007 determining that the prescription sleep medication Rozerem only increased patients’ sleep time by 11-19 minutes.

“Medicine is administered because someone is suffering; it exists to manage symptoms,” Dr. Michael Twery, National Center on Sleep Disorders Research Director explained to me. “People have all kinds of complicated situations. Tools have been developed as one approach to address an issue. It can be a shortcut to escape our environment.”  That made a lot of sense to me. These supplements were created to help those that truly needed them. I initially thought they were the best solution for me, but my body argued otherwise.

I had started to pull the rug off the deeper problem and finally began to see that I needed to go back to the drawing board. Both doctors that I spoke with urged me to consider making more serious changes to my lifestyle or risk the repercussions. Dr. Grandner provided me with just the warning I needed to get back on track. “Poor sleep over time can increase the likelihood of weight gain and obesity, heart disease, diabetes, depression, anxiety disorders, reduced quality of life, reduced work performance, and even a shorter lifespan.” Out of those options, I’ll choose none of the above.

Making a permanent change to my sleep and wakefulness cycle wasn’t easy. As Dr. Twery pointed out, behavioral tools and interventions take time. “We are creatures of habit and routine,” he emphasized. “Coordination of the brain and the rest of your body, with a healthy lifestyle, helps get optimal health and regularity of sleep and wakefulness.” But how do I attain this brain-body coordination in the name of optimal health? First I had to break one of my favorite habits: night coffee. I often feel incredibly fatigued by the end of the workday—a combination of a poor night’s sleep the previous evening coupled with the daily stresses of my job. I’d rather chug a medium-roasted pick-me-up on the commute home than lounge around like Jabba the Hutt every evening. This hasn’t been an easy tradition to break. They say absence makes the heart grow fonder, but I’d replace “fonder” with “crankier” alongside some other choice descriptors in this instance.

I cut out another beloved ritual in my sacrifices for quality sleep: checking e-mail in bed. A definite no-no. Dr. Twery made that incredibly clear, saying, “Researchers have found that if we sit in front of a bright LED or cell phone, it can suppress or weaken signals for sleep. We should avoid exposure to blue light.” Checking e-mail in bed was a multi-faceted problem for me. Of course, not only was, the blue light tricking my body back into a state of wakefulness, the messages themselves were also an issue. After temporarily catching up on the never-ending onslaught of work email, I’d lie back on my mattress and run through every mundane detail of my day over again. Like many people, I’m my own worst critic. Did I send that spreadsheet to Tyler? Should I have closed that e-mail to a client with ‘Warmly’ instead of ‘Thanks? Question after question, every night was an anxiety-inducing mental rerun of mostly insignificant actions I’d taken that day.

Eliminating the e-mail in bed restored a more positive work-life balance for me that was also required for a good night’s rest, but simply powering down earlier wasn’t enough. My mind still raced at a million miles a minute and I struggled to unwind. Then, I integrated nightly meditation into my reformed sleep routine and everything changed. “There is great data showing that meditation can be a useful tool for promoting healthy sleep,” Dr. Grandner pointed out. “It takes a bit of practice, but meditation can help the mind get to where it needs to be in order to allow for sleep.”

I had already eliminated standard components of my life that could negatively impact my sleep cycle —caffeine, evening exposure to blue light, and late-night work from my daily habits—but the addition of nightly meditation was the cherry on my quality sleep sundae. I don’t need to distract myself with never-ending queues of sheep or over-the-counter crazes. Meditation enables me to focus on my body, restore its natural rhythm, breathe deeply, and finally relax—naturally. The only negative side effect to my newly rebalanced sleep cycle? I snore, but I couldn’t be happier about it.

The author of this post is an editorial contributor to Headspace. These are their views, experiences and results and theirs alone. This contributor was paid for their writing.