A pill to help insomniacs drop off instantly could be developed after scientists discovered the brain switch which triggers sleep, reports The Telegraph.

“The circadian clock allows us to anticipate predictable changes in our environment that are caused by the Earth’s rotation,”said lead author Professor Gero Miesenböck.

“As such, it makes sure we do our sleeping when it hurts us least, but it doesn’t speak to the mystery of why we need to sleep in the first place.

“That explanation will likely come from understanding the second controller—called the sleep homeostat.”