Sleeper agents are spies who are placed in a target country or organization, not to undertake an immediate mission, but rather to act as potential assets if activated at a later point in time.
Sleeper agents are popular plot devices in fiction, in particular espionage fiction and science fiction.
Sleeper agents in espionage
In espionage, a sleeper agent is one who has inflitrated into the target country and 'gone to sleep', sometimes for many years. That is, they do nothing to communicate with their sponsor, any existing agents, nor to obtain information beyond that in public sources. In Soviet parlance, they are known as "Illegals". They can also be referred to as deep cover agents. They acquire jobs and identities--ideally ones which will prove useful in the future--and attempt to blend into everyday life as a normal citizen. Counter espionage agencies in the target country cannot, in practice, closely watch all of those who might possibly have been recruited some time before.
In a sense, the best sleeper agents are those who don't even need to be paid by the sponsor as they are able to earn enough money to finance themselves. This avoids any possibly traceable payments from abroad. In such cases, it is possible that the sleeper agent might be successful enough to become what is sometimes termed an agent of influence. The Soviets managed to recruit several people after WWI who reached high positions in Britain and in the U.S.
Those sleeper agents who have been discovered have often been natives of the target country who moved elsewhere in early life and been co-opted (perhaps for ideological or ethnic reasons) before returning to the target country. This is valuable to the sponsor as the sleeper's language and other skills can be those of a 'native' and thus less likely to trigger suspicion.
Choosing and inserting sleeper agents have often posed difficulties as it is difficult to predict which target will be appropriate some years in the future. If the sponsor government (or its policies) change after the sleeper has been inserted, the sleeper might be found to have been planted in the wrong target.
* Otto Kuhn and family were installed in Hawaii by the German Abwehr before WWII. It is not quite clear what was intended as Hawaii was hardly at the center of predicable German interests in case of war, and in any case, they were unmistakably German. However that may have been, he (and his family) seem to have been used primarily to aid an ally—the Japanese—in the period before the Attack on Pearl Harbor. They seem to have been less than useful, even to the Japanese.
* Kim Philby was recruited by the Soviets while at university and may have been a sleeper agent for some years until going to work for the British government. By the end of WWII, he was operating as the liaison between the British Secret Intelligence Service and several U.S. intelligence operations. He was an agent of influence by then, but had not been a sleeper agent for several years.
See also: Sleeper Cell