A new study has found that people who spend time on their devices in bed are likely to suffer from sleep loss and insomnia.