This was the plot of the comic book Dark Empire released back in 1991.
The corrupting power of the Dark Side causes Palpatine's body to deteriorate rapidly, so he started growing clones of himself and when his body began to fail, he would transfer his consciousness into a new clone. His death in RotJ was unexpected and he was a very long way from his cloning facility near the center of the galaxy so it took everything he had to make the transfer, leaving him extremely weak for a long period of time.