Regularly using your phone late into the night may be ruining your sleep cycle and damaging your brain, a study suggests.