(CNN) You love your smartphone, but it may be ruining your ZZZ's. Use of these devices, especially near bedtime, is associated with worse quality of sleep, according to a new study .

"When we looked at smartphone use around the time when participants reported they went to bed, more smartphone use around that time in particular was associated with a longer time to fall asleep and worse sleep quality during the night," said Dr. Gregory Marcus, author of the study and an associate professor of medicine at the University of California, San Francisco. His research was published Wednesday in the journal PLOS One.

Tech addiction

The word "crackberry" became popular roughly a decade ago to describe the addictive quality of BlackBerry devices -- arguably the first really successful smartphones. Today, most everyone is a smartphone junkie, standing with head bowed while waiting for a train or in line at the post office.

Knowing that smartphone use has increased in tandem with sleep deprivation rates, Marcus and his colleagues decided to investigate whether the two might be related. To answer this question, he used existing information collected by an Internet-based study he started in March 2013.

"Health eHeart," which was funded by the National Institutes of Health and endorsed by the American Heart Association, is designed to study cardiovascular health. Anyone 18 years of age or older can enroll in Health eHeart, co-founded by Drs. Mark Pletcher and Jeffrey Olgin, professors at UCSF.

After signing a consent form, enrolled participants self-report their health data via a series of online questionnaires. The information is gathered, analyzed and used to research and develop strategies to prevent and treat all aspects of heart disease.

About 80,000 participants have enrolled in Health eHeart, Marcus said. "We've had people from every state in the US, lots of people from every state, and we actually have people from 50 countries."

Marcus and his co-founders also make the data available to other scientists conducting unrelated studies. For the new smartphone study, Marcus dipped into this wealth of information to conduct his own "sub-study."

Mining the data

Of the total Health eHeart enrollees, 653 people chose to participate in and complete the new smartphone-sleep study. Participants installed an app on their phones to automatically record the total number of minutes in each hour the screen was turned on (total screen time) during a 30-day period.

JUST WATCHED How your smartphone affects your sleep Replay More Videos ... MUST WATCH How your smartphone affects your sleep 01:31

These participants had already reported their sleep hours and sleep quality using a validated questionnaire as part of the general Health eHeart experience, Marcus explained. So, when answering the sleep assessment questions, participants also entered demographic data plus information about their alcohol use, physical activity, smoking habits and other health issues.

By answering so many questions, participants were unaware of what the researchers were studying, explained Marcus: "We wouldn't expect any bias."

Analyzing the data, the researchers discovered that, on average, participants used their smartphones for a total of 38.4 hours over a 30-day period. Individuals with a longer average screen time were more likely to have poorer sleep quality and less sleep overall: About 35% of those who used their smartphones for shorter amounts of time than average had sleep difficulties, compared with 42% of those with average or greater than average use. And poor quality sleep was more likely for participants who used their smartphones near bedtime.

The researchers discovered that screen-time varies throughout a 24-hour period, but most occurs during the day. Yet for some participants, smartphone use peaked during the night.

"We can't exclude the possibility that some people can't sleep for some completely unrelated reason, and because they can't sleep, they're using their smartphone, just to pass the time," Marcus said.

Despite potential shortcomings, Marcus' research does align with other studies showing that the use of technology near bedtime is associated with difficulty sleeping, such as the 2011 National Sleep Foundation poll . Other research (PDF) has shown that the blue light emitted by smartphones (and other digital devices) might suppress our body's production of melatonin, a hormone that induces tiredness and contributes to the timing of sleep-wake cycles.

"So there's some biological plausibility supporting the idea that there is a causal relationship , but we weren't able to identify that," Marcus noted.

Sleep: A basic need

JUST WATCHED How your phone is suffocating you Replay More Videos ... MUST WATCH How your phone is suffocating you 02:50

"It is believed that sleep is a restorative process and a basic biologic need," said Dr. Neil Kline, a sleep physician, internist and representative of the American Sleep Association . "When animals, including humans, are deprived of sleep, there are many body systems that fail. Not only does our performance, memory and attention span suffer, our immune system and endocrine system is also impaired."

diabetes, According to Kline, who was not involved in the new study, sleep deprivation is associated with metabolic disease and increased appetite. Additional research suggests that poor sleep -- including low-quality or low-quantity sleep -- is a risk factor for obesity cardiovascular disease and depression

Though most of these negative effects have been studied exclusively in adults, children's sleep is also affected by technology, according to an unrelated study. Lead author Ben Carter, a senior lecturer in biostatistics at King's College London, and his colleagues discovered that for teens and children, the use of cell phones, tablets and computers is associated with losing sleep time and sleep quality.

Carter found the conclusions in Marcus' study "reasonable," but he believes the research is flawed in some respects. With participants sampled from the Health eHeart study, he said, the study is likely to over-represent those with poorer cardiac function and those who are a "little older than typical mobile device users."

Follow CNN Health on Facebook and Twitter See the latest news and share your comments with CNN Health on Facebook and Twitter.

"The more extreme users and the less extreme users had an average age of 44 and 52 years old and both groups were predominately female," Carter wrote in an email. The data, then, are derived from a small and specific sample of the population and so the study results may not hold true for the general population.

Marcus said he suspects that some people may be affected more than others and overuse of a smartphone impacts their sleep more than it would for other people. He hopes to investigate this question in the future.

Based on his results, he suggested that insomniacs and other troubled sleepers should avoid looking at their screens for half an hour or so before going to bed to see whether that might enhance the quality of their slumber.

He added, "There's almost certainly no harm in giving that a good try."