With about two weeks left before the summer holidays end, now is the perfect time to ease your kids back into a healthy sleep schedule for school, especially if rules were loosened over the summer or if your family spent the two-month break maximizing the longer daylight hours.

Waiting until the night before school starts to hustle them to bed early is setting yourself up for a potential battle, sleep experts say. The sudden change in sleep times can make falling asleep - and staying asleep - difficult, recipe for a cranky start to the first day of school.

According to the National Sleep Foundation, preschoolers (ages three to five) need 10 to 13 hours of sleep, while school age children (ages six to 13) need nine to 11 hours. Have a teenager at home? Children ages 14 to 17 need about eight to 10 hours of sleep.

An increasing number of research shows "getting enough sleep is a biological necessity, as important to good health as eating well or exercising." Adequate sleep is especially important for brain development in young children and teenagers.

Your child will have trouble concentrating in class if they are not getting enough sleep. Just 25 minutes less per night can result in lower grades, says the Foundation's Sleep.org. Sleep deprivation among teenagers in particular is a rising and serious problem, experts say, as homework, hectic extra-curricular schedules, jobs, and family obligations eat into valuable sleep time.

Every morning and night between now and the start of school, set an incrementally earlier wake-up time and sleep time, so that by the time school starts, they will be synced up with their school schedule and getting enough sleep for their age group. This could mean pulling their wake-up and bed times forward by five to 15 minutes every day.

The American Academy of Sleep Medicine says the gradual adjustment is especially important for teenagers, whose body’s internal “circadian” clock go through a shift during puberty. Those late-nights are not necessarily bad habits, but a result of biology.

Good sleep habits are not just about when and how long they sleep, however. It starts with avoiding caffeinated drinks six hours before going to sleep, according to sleep experts. The stimulant can interrupt natural sleep patterns, making falling asleep challenging. A heavy meal too close to their bedtime can also have the same effect as caffeine.

Limit screen time and other electronics before bed as well. Better yet, remove tech devices from the bedroom altogether ahead of their bedtime, Sleep.org advises. The buzz and sounds from notifications, as well as the type of light emitted by many phones are a distraction, can wake them up, or keep them awake.

Finally, set a bedtime routine that encourages quiet time and relaxation. These could include a bath and reading a book before bed. Eventually these consistent habits are cues for your child’s brain that it is bedtime.

"Sleep deprivation impairs their ability to be alert, pay attention, solve problems, cope with stress and retain information," says the National Sleep Foundation, adding that it also carries significant risk for "emotional and behavioral problems such as irritability, depression, poor impulse control and violence" and a host of other issues, including depression, especially for teenagers.

Once the new sleep schedule has been set for school, try not to backslide into “catching up on the weekend”. Setting a good sleep example for your child is an important part of establishing good sleep habits for the entire family.