Young adults who exercised vigorously before bed ended up getting better sleep than their peers who reported less strenuous evening activity, a new study found. The results, based on sleep patterns during a single night, go against the usual advice to avoid being too active before bed.

They studied 52 Swiss high school students who were an average of 19 years old and played sports two or three times per week.

The participants followed their normal routine on the day and night of the study, including playing sports for 65 to 90 minutes in the evening and ending about one and a half hours before their usual bedtime.

Before going to bed, students rated their mood and hunger levels and filled out a questionnaire that was designed to evaluate how vigorously they had exercised. That night they used a device that measures sleep patterns, called a sleep-EEG.

Brand’s team found that students who reported more exertion during sports fell asleep faster, woke up fewer times during the night and slept more deeply than those who had exercised less vigorously.

“We believe that the present study has the potential to shed light on the issue of whether evening exercising should be discouraged,” researchers wrote. “The findings may also have practical implications, since, for most employed adults and parents, evening hours often provide the only opportunity for exercise.”