A better night's sleep is all in your head