But in a new research paper, scientists have suggested getting some extra shut-eye can improve our immune system in the same way.
According to academics from the University of Tübingen in Germany, sleep improves our ability to "remember" encounters with bacteria or a virus.
Therefore, sleep gives our defence system a head-start when it comes to tackling illness.
The paper, published in the journal Trends in Neurosciences, states that the immune system "remembers" an encounter with a bacteria or virus by collecting fragments from the bug.
These fragments are then used to create a type of cell known as memory T cells.
Memory T cells last for months or years and help the body recognise a previous infection, then quickly respond to it. The cells also help the body to recognise similar, but not identical, infections.
The University of Tübingen scientists looked at previous studies which show deep sleep increases the production of memory T cells. They concluded that sleep deprivation can put our immune system at a dangerous disadvantage.
"If we didn't sleep, then the immune system might focus on the wrong parts of the pathogen," lead author Jan Born said in a statement.
"For example, many viruses can easily mutate some parts of their proteins to escape from immune responses. If too few antigen-recognising cells [the cells that present the fragments to T cells] are available, then they might all be needed to fight off the pathogen.
"In addition to this, there is evidence that the hormones released during sleep benefit the crosstalk between antigen-presenting and antigen-recognising cells, and some of these important hormones could be lacking without sleep."
Born says that future research should examine what information is selected during sleep for storage in long-term memory, and how this selection is achieved. He believes that this research could have important clinical implications.
"In order to design effective vaccines against HIV, malaria, and tuberculosis, which are based on immunological memory, the correct memory model must be available," he said.
"It is our hope that by comparing the concepts of neuronal and immunological memory, a model of immunological memory can be developed which integrates the available experimental data and serves as a helpful basis for vaccine development."