Trouble sleeping is incredibly common at any age. Does any of the following sound familiar?

• The toddler who refuses a nap and fights bedtime.
• The teen who is texting friends at 1 am.
• The parent who can’t relax at home and is overloaded with thoughts of work.
• The retiree who watches TV in bed for hours before finally falling asleep at midnight, only to wake again at 4 am.
Thankfully, there are some changes you can make at home that are likely to help everyone sleep more soundly.
Let’s start at the beginning. At birth, infants’ brains are not developed enough to know the difference between night and day. Babies gain this ability when they’re about 4 months old. This is the age at which I encourage parents to start teaching infants how to sleep well on their own, by allowing them to find ways to comfort themselves and by setting a consistent sleep schedule.

Although most babies transition to only one nap by 18 months old, many continue to need an afternoon nap until they are at least 3 years old, and some children benefit from a nap (or at least quiet time) until they start school. Many toddlers will go through periods of fighting naps and/or bedtime well before their bodies are truly ready to stop napping. When this occurs, I recommend parents maintain a consistent routine and continue to encourage an afternoon nap. Doing so often results in toddlers going back to their old sleep pattern before long. Many kids actually have a harder time falling asleep when they are overtired, so giving them the opportunity to catch up on sleep may help.

Although the amount of sleep children need decreases as they get older, most teens still need 8-10 hours of sleep at night to feel rested and perform at their best. An increasingly common challenge is the interference of screens (TV, video games, phones, and tablets) with sleep. I recommend families have a rule of not allowing screens in the bedroom overnight because the temptation to use them is strong. The last 30-60 minutes before bedtime should be spent without a screen, to give the brain a chance to wind down before sleep.

Screen use disrupts sleep patterns in children and adults. I often hear from adults that they have trouble sleeping because they can’t “turn off” their minds. Worrying and racing thoughts are common, and they can make it difficult to both fall and stay asleep. Regular physical activity is one of the best ways to allow the mind to clear so that sleep comes more easily. Trying just 10 minutes of walking every day may make a difference. Practicing muscle relaxation and breathing exercises also helps by breaking the cycle of worry and focusing the mind on physical sensations. There are many free videos online that can guide you through these techniques.

The amount of sleep we need continues to decrease from childhood through old age. Although naps can feel refreshing, I recommend avoiding them if you are having trouble sleeping at night, so that you feel more tired when it is time for bed. And the no-screens rule definitely applies to the bedroom. Spending a prolonged period of time in bed while awake can trick your brain into thinking it doesn’t need to be resting while in the bedroom. Using the TV to fall asleep usually backfires.

If you have tried these tips and are still sleeping poorly, I recommend that you see your primary care provider. It’s possible that there may be a medical problem that is preventing you from sleeping well.

Dr. Emily Erickson practices at Northern Light Mercy Primary Care in Gorham, Maine.