Sleep loss can negatively affect the immune system and may make someone more susceptible to a herpes infection. While a person sleeps, their body works to fight bacteria and viruses they may have been exposed to during the day. The National Sleep Foundation recommends that people aged 18–64 years get 7–9 hours of sleep per night. A person should try to get the recommended amount of sleep to help their body recover from a herpes infection, and they should consider speaking with a doctor if their symptoms are severe or persistent.