Sleep scientists have long suggested banning all technology before bed and cutting out caffeine as simple ways to combat insomnia. But these are not always effective.