Static latency is the hallmark of all herpes viruses. The varicella zoster virus, for instance, causes varicella (chickenpox), and after a latent phase of between 5 and 40 years, it can give rise to herpes zoster (shingles). This latency and the subsequent reactivation has intrigued and puzzled virologists. Although several factors have been suggested, it is unknown what triggers reactivation. However, latency can be explained with a simple evolutionary model. Here, we demonstrate that a simple, yet efficient, bet-hedging strategy might have evolved in a number of viruses, especially those belonging to the herpes virus family and most importantly in varicella zoster virus. We show that the evolution of latency can be explained by the population dynamics of infectious diseases in fluctuating host populations.