Some nights it's waiting for you with warm, welcoming arms when you sink into your pillows. Others, it can be harder to hold onto than a handful of sand on the beach.

The good news is that there are some nifty science-backed tricks to help you get a good night's Zzzz.

1. Lights out!

Yes, it might sound fairly obvious -- but it's not just enough to flick the switch. You need to turn off (and put away!) your brightly-lit phone/tablet/TV/laptop so as not to overstimulate your brain. Bright LED lights are like "clashing cymbols" to your brain when you're trying to sleep, Dr Emily Deans writes for Whole9Life. 

"Beautiful glorious 480nm blue light which makes our iPads look so awesome streaming Game of Thrones is a precision-tuned GOOD MORNING signal to the brain," she explains. She advises turning off before the sun sets.

If you can't do that (don't worry, we get you) try put away your devices at least an hour before bedtime.

2. Cool down your room

We know it's super hard to get to sleep during those sweltering summer nights -- so surely the opposite is true when you lower the temperature? According to Vox, the optimal temperature for a good night's sleep is  a chilly 18 ºC.

You can intensify the effect by taking a warm shower or bath before entering your room. This change in temperature will slow down your metabolism and make you drowsy.

3. Use the 4-7-8 method

You might have heard of this technique before. Created by Dr Andrew Weil, this breathing exercise is said to help you drift off in under one minute by increasing the oxygen in your blood stream, releasing carbon dioxide from your lungs and slowing down your heart.

"Get in the habit of shifting your awareness to your breath whenever you find yourself dwelling on stressful situations [before bed]," he advises. How? According to Dr Weil's site:

  • Exhale completely through your mouth, making a whoosh sound.
  • Close your mouth and inhale quietly through your nose to a mental count of four.
  • Hold your breath for a count of seven.
  • Exhale completely through your mouth, making a whoosh sound to a count of eight.
  • This is one breath. Now inhale again and repeat the cycle three more times for a total of four breaths.

4. Sweet smells

As Vox points out, it might sound a little new-agey, but a dab of essential oil on your pillow might be just what you need to send your busy mind off to La-La Land.

Studies have consistently shown that oils like lavender oil can help relax the body. The smell of lavender in particular has been shown in human studies "to slow down heart rate, slow blood pressure and put you in a parasympathetic state, which is a relaxed state," says University of Miami School of Medicine scientist Tiffany Field.

Another tip: open up the curtains and embrace the sunlight in the moring to give your brain a healthy dose of light to properly wake you up.

Sources: Vox.com, WSJ.com, drweil.com, Huffingtonpost.com, TIME.com, Whole9Life