Staring at phone, television, and tablet screens right up until bedtime has long been blamed as a major cause of insomnia.

But as the night draws in, most people still don’t turn off their devices. Instead they stay gripped to their gadget right up until the last minute, even if it means hours of tossing and turning before finally falling into a much-needed peaceful slumber.

But what if you found yourself in a situation where you don’t have your phone, a TV, or access to electricity at all? Would that actually make a difference to your ability to get to sleep?

A study in the US found that going camping helped people to fall asleep two hours earlier than usual. Dr Kenneth Wright from the University of Colorado sent participants on a six day camping trip in the Rocky Mountains, leaving all torches and gadgets behind. Sunlight, moonlight, and campfires were their only sources of illumination, and the results were positive.

I have always been the biggest culprit for texting and watching TV while I’m lying in bed, and then spending hours wondering why I can’t fall asleep. This happened to me night after night for years.

Then last year I went to Nicaragua for three months on a volunteering project. Based in the middle of nowhere, there was no electricity, no digital screens, no artificial lighting.

Five places to sleep in the trees Show all 5 1 /5 Five places to sleep in the trees Five places to sleep in the trees Vindoux's treehouses and cottages offer idyllic views of orchards, vineyards and the Saronsberg Mountains Five places to sleep in the trees Orion's chic, cedar-wood lodges come with balconies and grown-up interiors: wooden bathtubs, snowy linen, tactile textiles and broadband. Five places to sleep in the trees Set on a riverbank in the rainforest of the Cairns Highlands, The Canopy's houses come with a balcony, barbecue and hammock, so you can spy on the neighbours: tree kangaroos, possums and king parrots. Five places to sleep in the trees Tree House Lodge is in a wildlife refuge on Costa Rica's southern-Caribbean coast, and comprises beach house, beach suite and tree house. Five places to sleep in the trees Built around an oak tree, Kinlochlaich Treehouse is an octagonal cottage that overlooks the Appin Hills, with a deck for summer days.

The first night, the host family I stayed with were in bed as soon as it got dark at seven pm. This seemed absurd, so I strapped on my head torch and read until a ‘reasonable’ hour, knowing that I couldn’t usually get to sleep until after midnight.

Though I was using artificial light, there was no phone, computer, or TV screen in sight.

The family were out of bed at sunrise, and I didn’t want to appear lazy so I got up with them. Five hours sleep was not ideal.

The next night, the batteries in my head torch had run out, so with no light at all I went to bed at the same time as them. I was amazed that I fell asleep almost immediately, and what’s more, as the sun rose, I woke up naturally and felt really well rested. After all, I had been asleep for ten hours, which is the same amount of time the participants in the study reported to sleep.

From that night on, as the sun began to set I would head to bed, and I felt more energised than ever before. According to the study, this is because my internal “circadian clock” was reset and aligned with solar time.