Scientists have warned that using the devices too much can make it hard to switch off at night.
The Swedish researchers, who also said there were links to depression, claim many people are struggling with an information overload caused by the blurring of boundaries between their work and home lives.
Youngsters should be taught about the “healthy” use of technology, they said, including taking screen breaks and understanding that they do not have to be available 24 hours a day.
In a series of studies, hundreds of men and women aged 19 to 28 detailed their computer and mobile phone use, including how many text messages they sent and received, how often they were woken at night by their phone, how many hours a day they spent at their computer and how long they would stare at the screen without taking a break of at least 10 minutes.
Some didn’t use a computer at all. But others claimed to be in front of a screen for up to 150 hours a week.
They were also asked about symptoms of stress and depression and whether their sleep was disturbed. In one of the studies, volunteers who said they thought their use of technology was harming their health were interviewed in detail.
Put together, the results showed a clear link between heavy computer and mobile phone use and disturbed sleep.
Spending long hours in front of the computer was associated with depression in women but not in men. The researchers from the University of Gothenburg suspect this may be to do with differences in the way the sexes use technology.
The scientists cited several reasons why spending too much time on a computer or mobile phone could be bad for mental health and sleep, including the stress of taking work home and feeling the need to constantly be contactable via phone or email, to the frustrations of IT breakdowns.
They said too little sleep can take its toll on mental health, messages sent electronically can be misinterpreted, a lack of face-to-face communication can foster loneliness, and high phone bills can prey on the mind.