Sleep can help us consolidate memory

  Scientists use computer models to simulate different states of the brain (such as sleep and awake states) and found that when people are asleep, the brain will continue to repeat what they have learned during the day to help us reorganize our memories and effectively present them. The new and old memories are dynamic. In other words, even the old memory is not the final memory. It will be constantly updated and played back during sleep, which can prevent the memory from being forgotten and strengthen the memory.
  We have new memories every day, which will compete with the original memories, and sleep can help the brain to accommodate all memories. For example, when we first learn to play badminton, the brain stores the memory of learning badminton skills, and then when we learn to play basketball, basketball skills will become new memories in the brain. Sleep can ensure that the memory of basketball skills will not erase the memory of badminton skills, and make the memory of two different skills stored in the brain.
  The research may help improve our memory or learning ability, and it may be especially important for the elderly or people with learning disabilities.