Following the Russian Revolution of 1917, which meant the end of the old Russia, Rachmaninoff with his wife and two daughters left Saint Petersburg for Stockholm on 22 December 1917. They never returned to the home country afterwards.
After Rachmaninoff’s departure, his music was banned in the Soviet Union for several years. His compositional output slowed, partly because he was required to spend much of his time performing to support his family, but mainly because of homesickness; he felt that, when he left Russia, it was as if he had left behind his inspiration.
The falloff in Rachmaninoff’s output was dramatic. Between 1892 and 1917 (mainly living in Russia), Rachmaninoff wrote 39 compositions with opus numbers. Between 1918 and his death in 1943, mainly living in the U.S., he completed only six.
As the years went on, and he became more and more aware of the fact that he would never again return to his beloved homeland, he was overwhelmed with melancholia. Most people who knew him later in life described him as the saddest man they had ever known. Nevertheless, his Rhapsody on a Theme of Paganini, today one of his best-known works, was written in Switzerland in 1934.
Wikipedia on Sergei Rachmaninoff