We all know the immediate downsides of too little sleep. Yet there’s a longer-term implication: a critical job your brain works on while you’re asleep. It may seem subtler than the more obvious benefits sleep contributes to cognition, health, mood regulation, and more – but it’s every bit as important.

You see, your brain clean things up when you sleep. It brushes away inactive synaptic connections – old information you no longer actively use. This allows it to store and create pathways to incoming information, mapping new inputs and experiences to established and important older ones. This, in a word, is how we learn. And sleeping is the time when we “forget” the stuff that doesn’t matter so we’re sure to retain the stuff that does.

Imagine a diligent museum curator – one who’s been on the job forever. When you’re awake, the curator rests. But the work it’s done in the past, while you’ve been sleeping, helps you navigate and make sense of the world around you. Thanks to this curator you can interpret each day’s experiences in the context of everything you’ve learned and experienced before.

Because of this curator, your brain can make the vast majority of its decisions and interpretations without you intentionally having to “think.” Its archives are so well organized we can call upon them instantly. What’s more, the most popular collections, whatever they might be, are the most easily available. That curator knows what you’re thinking about and what you pay attention to – and it helps those things be the first thing your brain sees, so to speak, when it interprets what’s going on.

This is your museum we’re talking about: the museum of your life. And, though the “curator” metaphor is a vast oversimplification, it illustrates the workings of a lifelong brain function: synaptic pruning. This process kicks in when we check out, shrinking synaptic connections by up to 18 percent. Working across the brain, microglial cells patrol the brain in search for weak links: connections that have fallen inactive. They clean up dead neurons (and a lot of other things), preparing the brain to build new ones.

Active connections get a different treatment than inactive ones. They are preserved, optimized for connecting to existing pathways and becoming part of the complex maps that comprise our memories and cognition. Working diligently while you sleep, your brain “organizes and makes useful” (to borrow Google’s mission statement) inbound information so the most relevant things are easy to find and the unused, stale stuff eventually slips away.

Simply put, this is how we learn. That curator helps inactive information move to the storage closet, so to speak, while showcasing the information we’ve more recently received or paid attention to. Night over night the process continues, strengthening associations between related information so your brain can quickly find the new thoughts in the context of other maps it has built over time.

Without this reset, your mental museum would become cluttered and disorganized. With useless old items lining the halls, you’d have no way to efficiently find the valuable treasures, or even to know which was which. Metaphorically speaking, of course.

Simply put, we sleep to forget. But forgetting makes room for new remembering – and this essential work happens when we sleep.

Knowing this, we can help our brains strengthen things we want to develop and grow by intentionally activating them: calling them to mind.

In other words, since our brains use our thoughts and activities as signals of what matters to us, we can help our curator know what’s important by deliberately directing our thoughts.

We can do this anytime, yet making it a pre-sleep practice helps ensure thoughts are activated, even if they haven’t risen on their own during the day.

Try this. Take a few minutes before bedtime to think about the things that matter most to you. Reflect on the day’s important moments. Imagine your dreams and goals. Envision what’s important in the coming days. Direct attention to things you’re grateful for. It’s almost like you’re having a 1:1 with that curator to help it do its job better. You’re helping it prioritize what matters to you so it can take that into consideration when the night shift begins.

What if worries or negative thoughts come up? Take an “anti-curation” approach by turning to the things you want to nurture while you sleep: something you seek in your friendships and relationships, a long-term vision for yourself, a beautiful memory you want to build upon, or a new ability you’re looking to learn. You’ll help your brain prioritize these things as the night shift begins. With practice, you’re favoring your brain to help the unwanted thoughts fade away.

Your curator is listening: to you. It can work on its own, responding automatically to the noise and activity from the world around you. Or you can work with it by intentionally directing what you want it to showcase in that museum of you. Helping your brain do this while you sleep may be one of the most transformative powers of sleep. Put it to work for you. 

Ellen Petry Leanse brings decades of experience with high-impact companies like Apple, Google, and dozens of technology innovators to her work on leadership and life purpose. A respected speaker, coach, and author, she also teaches at Stanford University and works with individuals and organizations to help them increase focus and impact. Her book, “The Happiness Hack,” offers easy, brain-aware ways to bring more focus, purpose, and satisfaction to everyday life.