Even if you don’t have insomnia, there’s still a decent chance you aren’t getting enough sleep. The amount we need varies from person to person, but a 2016 review study concluded that most adults need more than seven hours sleep a night. Anything less than that is associated with an increased risk of obesity, dementia, diabetes and heart disease, among other issues. The number of Americans who get six hours of sleep or less each night is rising, however.

“When you disrupt your sleep over the long term, it starts to erode your health in many, many ways,” says Michael Twery, director of the US National Center on Sleep Disorders Research.

Beyond that, we understand surprisingly little about sleep. For example, we have no idea why some people sleep well and others badly, says Jamie Zeitzer, associate professor at Stanford University’s center for sleep sciences and medicine.

What we do know is that it’s not just the amount of sleep that counts. The type of sleep is important too: we need a mix of deep, light, and REM sleep (rapid eye movement—the last stage before you wake up). A full sleep cycle completes every 90 minutes, and we need about five of these cycles a night to be properly rested. That’s because the cycles differ as the night goes on: early cycles include more deep sleep, and we have more REM sleep in the latter stages. Good sleep also involves sleep “efficiency”: being asleep for the majority of the time spent in bed.

So how do you know you’re getting the “right” kind?

That’s where sleep-tracking gadgets can help. If you go to a medical professional complaining of insomnia, one of the first questions they will ask is exactly how much you sleep. If you don’t know that, how can you be sure whether you really have a problem? “We suggest people use a sleep diary or use technology to track their sleep,” says Twery.

As a general rule, sleep trackers use your movement as a proxy to estimate how much of the night you spent asleep. I’d never actually logged my sleep this way; instead I relied on doing rough calculations in my head. But the idea is compelling, especially for tech-minded types, so I decided tracking was where I should start. One of the easiest ways to do this is a sleep-tracking mat you place under your mattress.

“Sleep is like a cat. It only comes to you if you ignore it.”

One of the best-selling mats is made by French firm Withings. It uses embedded pressure sensors to track how long and how deeply you sleep, your heart rate, and your snoring (there’s a microphone inside the mat, which I switched off after the first night—no thanks).

That first night, acutely aware that my sleep (or lack of it) would be tracked and scored, I tossed and turned, repeatedly thinking about the data that would be produced. The mat did yield a lot of data, but none of it was very useful, because it couldn’t distinguish between my husband and me. It was ditched after a week.

I needed something that tracked me, and only me.

Perhaps the Oura ring was the answer. It’s a sensor-packed, chunky band you wear on your finger. Intended to be worn 24/7, it carries an accelerometer that monitors movement, sensors to track your temperature, and infrared LEDs that measure your heart rate. It’s less cumbersome than wearing a smart watch. The data is presented in a series of dashboards in a slick app. It seems accurate: it told me I slept for about seven hours most nights, switching between deep, light, and REM sleep, with a few stretches of being fully awake.

But unless a device is monitoring your brain activity, it cannot actually tell what stage of sleep you are in, says psychologist Elizabeth Woodward. Rings, watches, or mats, which use movement as a proxy, simply aren’t reliable enough.

That left the last tracking option: the Dreem headband. It’s one of the only sleep trackers on the market to deploy the so-called “gold standard” of sleep monitoring used in the laboratory: electrodes placed along your forehead, which record your brain activity using an EEG. Another, called Sleep Shepherd, uses the same concept.

Dreem

They both look ridiculous. However, the concept is viable, according to Woodward. She says clinical trials that are now being conducted of sleep-tracking headbands have shown promising early results. “Dreem says it has five EEG sensors. It won’t be perfect, but it could give a good idea of your sleep stages,” she says.

The data from the Dreem headband chimed with how much I thought I’d slept. However, sleeping with a headband on every night isn’t something I feel like putting up with long term. And frankly, I’m not sure what I’m meant to do with the information about sleep stages anyway, beyond going to bed at a decent time and avoiding caffeine later in the day, both of which I already do.

Dreem also requires you to use an app, pressing a “Sleep started” button when you go to bed. This meant I had to leave my smartphone on overnight (before this experiment, I tended to turn it off from about 8 to 9 p.m. onwards). This felt like a backwards step. The Dreem headband might be useful for some people, but not for me.

There is one potential benefit to the Dreem, though: it can allow you to be monitored by physicians at home rather than requiring you to sleep in a laboratory while you’re evaluated, Twery told me. This could be useful for diagnosing serious disorders like sleep apnea, Woodward says.

The downside with so much of this tracking technology is that it encourages you to see sleep as something that can be “fixed,” or a gamified process you can “win” or score well on. For an insomniac like me, that’s counterproductive. In fact, there’s now a word for an unhealthy obsession with your sleep stats: orthosomnia.

“We want insomniacs to stop focusing on the numbers,” Zeitzer explains. So instead of continuing to obsess over tracking the number of hours of sleep I’m getting, I decided to see if any other types of tech products out there might help.

"There’s now a word for an unhealthy obsession with your sleep stats: orthosomnia."

Numerous studies (albeit with very small sample sizes) have concluded that light therapy can help with insomnia. It makes sense: we are animals, after all, and our circadian rhythms are controlled by a tiny bit of our brain that responds to light and dark. Given the evidence, it seemed worth a go.

So I tried a Lumie “sunrise simulation” alarm clock. You set the time you want to wake up, and the light on the top of the clock very gradually brightens in the half-hour before that time. The clock is popular with athletes: it’s used by Premier League footballers, cyclists, and the British swimming team. I liked it, as it seemed to make waking up much less of a jolt. And waking up at roughly the same time each morning is one method that is often recommended as a way to beat insomnia. Lumie is a keeper, but it doesn’t really help with getting me to sleep in the first place, or getting me back to sleep if I wake during the night. It just helps me, in a small way, deal with the effects of not getting enough sleep.

SOMNOX

We all know, though, that unwinding helps us prepare for sleep. Enter Somnox. It’s a $599 kidney-bean-shaped robot designed to help users relax as they snuggle and synchronize with it while it gently “breathes” in and out. Somnox claims that breathing in time with the robot will let you reach a meditative state of mind, making it easier to drift off. It doesn’t provide any evidence to back this up. Perhaps the sleep robot works for some people. It did not for me. It was rigid and distinctly non-cuddly. Breathing in time with it did not come naturally. It went on the shelf.

I found myself, bleary-eyed at 3 a.m., Googling the merits of weighted blankets. The idea is that the gentle but firm pressure reduces cortisol and increases dopamine, serotonin, and melatonin—hormones that promote relaxation and tell our brains it’s time to sleep. A couple of friends swear by them. The appeal isn’t hard to see—but hard evidence that they work for insomnia is scarce.

All the while I tested these gadgets, I found my sleep worsening. My anxiety levels went up, almost inevitably: the stress hormone cortisol declines with good sleep, but lack of sleep leads to higher cortisol, and that means more stress. All this effort on finding tech that would help me sleep better was having the opposite effect.

On the verge of giving up on it all entirely and just taking medication, I turned to a friend who recommended I try cognitive behavioral therapy. CBT for insomnia has the benefit of science to back it up. There are 25 years of robust evidence that it works, from randomized, double-blind placebo-controlled trials. Even better, you don’t need that much CBT for it to work: just four to eight sessions, a recent review of the research concluded.

ptsd.va.gov

“CBT should be first-line therapy for insomnia,” advises consultant neurologist Kirstie Anderson, who runs a large research program on sleep at Newcastle University in the UK.

Why does it work so well? Because, in essence, the way to sleep better is to worry about it less, she explains: “Sleep is like a cat. It only comes to you if you ignore it.”

I worried I couldn’t afford to fork out fees for a therapist. Handily, I didn’t need to: a growing number of apps promise to provide you with CBT for insomnia on the go, in your pocket. There are several on the market: Somryst, developed by Pear Therapeutics; CBT-i Coach, created by the US Department of Veterans Affairs; and Sleepio, created by the University of Oxford professor of sleep medicine Colin Espie. Sleepio is free for me, thanks to the UK National Health Service, so that’s the one I tried.

An avatar with a soothing Scottish accent guided me through six weekly sessions on my phone or laptop. Its professorial, firm, reassuring manner made me instantly feel in good (virtual) hands. In essence, it’s a combination of questionnaires, advice, feedback, and self-reflection. Like any CBT, it’s about challenging negative thoughts and beliefs (the downward spiral of stress, frustration, and fear will be familiar to any insomniac). Sleepio helped stop the onset of this negative cycle of emotions remarkably effectively.

Within just a couple of sessions, I was sleeping better. I’m no longer obsessing over the number of hours I’ve slept. In fact, I no longer even know how many hours I’m sleeping. All the trackers are gathering dust in the drawer.

I’m taken aback at the transformation, but Zeitzer says it’s a typical response to CBT for insomnia. “It’s all about getting that person to stop worrying so much about their own sleep. It’s like teaching someone how to swim,” he says. “At first they think they’re drowning. They just have to learn to ignore their own fear.”