The temptation of using these devices makes people go to bed later but they still have to get up early for work or school, so end up being tired.
Some 93 per cent of UK homes with internet access have broadband, suggesting there are millions of people losing sleep because of the world wide web.
People with DSL internet access — broadband internet — are significantly less likely to get the recommended seven to nine hours of sleep a night, the study found.
Having a tight time schedule in the morning and the habit of using electronic devices at night add to the loss of sleep by making people less restful.
To find their results the researchers compared data on broadband speeds across Germany with national surveys about people's sleeping habits.
Younger people more likely to use social media or games
How people use the internet varies depending on their age — teenagers and young adults, ages 13-30, are most likely to play computer games or watch TV or videos.
Whereas older adults, between 31 and 59, are more likely to be using their smartphones or computers to browse the internet.
People stay up later but cannot sleep longer in the morning
The project leader Francesco Billari said: "Digital temptations may lead to a delay in bedtime, which ultimately decreases sleep duration for individuals who are not able to compensate for later bedtime by waking up later in the morning."
A third of adults say they don't regularly get enough sleep, according to the US Centers for Disease Control and Prevention.
And 90 per cent of British households have internet access, with 93 per cent of those using high-speed broadband lines.
This suggests millions of people could be losing out on precious shut-eye because they can't pull themselves away from the internet.
The study found that, as well as reducing average sleep time by 25 minutes, fast internet access in someone's home makes them substantially more likely to say they don't get enough sleep, and decreases how satisfied they are with their sleep.
'High speed internet makes staying up very enticing'
The authors added: "High-speed internet makes it very enticing to stay up later to play video games, surf the web and spend time online on social media."
And they add concerns that social media and "digitalisation of the bedroom" could be damaging children's sleep habits and performance at school, but there is not enough evidence.
The findings were published in the Journal of Economic Behaviour and Organization.
LACK OF SLEEP RAISES RISK OF ANXIETY AND DEPRESSION
Less than eight hours' sleep is linked to anxiety and depression, research suggested in January.
Insomniacs are less able to overcome negative thoughts than those who get sufficient shut eye, and being unable to nod off also reduces people's ability to disengage from negative emotions, the research adds.
Study author Professor Meredith Coles from Binghamton University in New York said: "We found that people in this study have some tendencies to have thoughts get stuck in their heads, and their elevated negative thinking makes it difficult for them to disengage with the negative stimuli that we exposed them to.
"We realised over time that this might be important — this repetitive negative thinking is relevant to several different disorders like anxiety, depression and many other things."
The researchers analysed 52 adults with "repeated negative thinking" — the compulsive focus of attention on thoughts that cause sadness, anxiety and distress.
The study's participants had varying sleep durations and bedtimes, and interviews were carried out to determine their sleep patterns.
They also viewed images intended to trigger an emotional response, as well as neutral pictures, while the researchers monitored their eye movements.
People who did not get enough sleep spent more time looking at negative images, suggesting their tendency towards negative emotions is greater.