Brain activity and good diet may prevent insomnia and depresseion