School will be back in session in just a few weeks, so parents may want to start thinking about their child’s sleep schedule now.

“Sleep is such a vital part of overall well-being,” said Dr. Katherine Shedlock, a pediatrician at Penn State Health. “It’s important for our mood, our overall mental health. It’s important to prevent frequent headaches, which a lot of children get, especially at the start of school because of the stress and change in their activity.”

Shedlock says if your child has been staying up late and sleeping in over the summer, you’ll want to start to make adjustments about two weeks before the start of their classes. This is particularly important for kids who were virtual last year and have not been in the habit of waking up to get ready for school in more than a year.

Shedlock suggests moving bedtime back in 10 to 15 minute increments each day until you reach your goal.

And it’s important to make sure your child is getting enough sleep. For pre-schoolers, that magic number is 10 hours. For elementary and middle school students, they should aim for nine hours a night. High school students should try to get at least eight hours of sleep.

Shedlock says it’s important to establish a good bedtime routine and make sure that routine does not include a screen, such as a phone, tv or iPad.

“Those screens will keep us awake longer, so if we put the screen down and immediately try to go to sleep, the mind thinks it’s still daytime,” she said. “That light and that activity from the screen is going to trick our mind into thinking we should be awake, so it takes a lot longer to go to sleep after being off of that screen.”

Shedlock suggests leaving docking stations and chargers for phones, laptops and tablets outside the bedroom. She also says kids should avoid caffeine, especially during the second part of the day.