More than one out of every three 12- to 15-year-olds wake in the night at least once a week just to use social media, a Cardiff University study suggests.
And more than one in five do so almost every night, leaving most constantly tired at school.
Out of all the 848 pupils surveyed in schools across Wales, one out of every three was constantly tired, but that proportion was smaller among those who got up at the same time every morning.
Staying up late had less of an impact.
Of the 412 12- to 13-year-olds surveyed:
-17% stay up beyond midnight on school nights
-22% wake to use social media almost every night
-a further 14% do so at least once a week
Of the 436 14- to 15-year-olds surveyed:
-28% stay up beyond midnight on school nights
-23% wake to use social media almost every night
-a further 15% do so at least once a week
Study author Dr Kimberley Horton said: "Having a regular wake-time and using social media during the night appear to be more important in determining whether a young person is always tired during the day than the time they go to bed, how long they spend in bed and having a regular bedtime.
"It seems very important to discourage adolescents from using social media during the night.
"No amount of effort to develop regular bedtimes or to lengthen the time in bed would seem to be able to compensate for the disruption that this can cause."
The data, drawn from a multi cohort study by the Wales Institute of Social and Economic Research, Data and Methods, is to be presented to the British Educational Research Association conference at Queen's University, Belfast, on Tuesday.