Yes. Using a smartphone (or another blue-light-emitting device) in bed can make sleep more difficult to come by, as can drinking caffeinated beverages or doing vigorous exercise too close to bedtime. Other, subtler behaviors—such as lying awake in bed for hours—can also worsen insomnia-related anxiety and train the brain to associate the bed with sleeplessness. Experts recommend getting up and doing a quiet activity rather than lying awake in bed.