Is a come back to mathematical research possible? Living in France, I am sometimes asked about Cédric Villani, a very popular figure here. Will he come back to mathematics ? The question becomes more relevant with the coming parliament elections (he should not candidate, having split with the president's party).
My impression is that it would be difficult for him. Even after a two-weeks vacations, I find a bit difficult for me to think hard on a mathematical problem ; I just cannot imagine stopping a year long.

Are there examples of mathematicians who stopped mathematics for a while (at least several years) and then resume and achieved valuable results in their second career ?

Notice that the break may have various causes, such as nervous breakdown, imprisonment, war time, ... Of course, Jean Leray doesn't count, as he kept doing maths in an oflag (and what maths !).
Besides the case of women who stopped because of motherhood (I should have think of it from the beginning ; thanks to Fedor), let me mention that of chinese mathematicians who were sent to the countryside during Cultural Revolution (e.g. Hsiao Ling).
 A: To answer the question about Villani, he has come back to mathematics in september 2022 with a Chair in Analysis jointly at IHES and Université de Lyon.
Source : https://www.ihes.fr/cedric-villani-rejoint-ihes/
A: Not really relevant but I did a part-time Maths PhD, starting at age 48 having done a first degree in Physics and spent my whole career in computing.  I wasn't very good but it made a change from programming & teaching.  I'd always wondered whether I could have been a mathematician and now (maybe) I know.
It took seven years after which I took early retirement!
A: Alice Roth became a mathematics teacher after her Ph.D. in 1938, and only returned to research after her retirement in 1971. Her 1976 paper on the "fusion lemma" is said to have "influenced a new generation of mathematicians worldwide".
Further listening: 8 minute portrait
Further reading: Alice in Switzerland: The life and mathematics of Alice Roth

Alice Roth remained at the Humboldtianum [high school] until her
retirement in 1971. It appears that shortly before retirement she had
begun her transition back to work in mathematics. After announcing her
plans to return to research to friends and relatives, she was told by
one of them that in his field of medicine it would be impossible to
return after so long an absence. Surely, most mathematicians would
agree that it is impossible in the field of mathematics as well.
And so Alice Roth would seem an unlikely candidate for success. Yet
much had changed in the thirty years that she  had been teaching. In
particular, Roth's area of research – begun over thirty years
earlier – had become fashionable. [...] At last Alice  Roth had time on her side and was able to put her mathematical creativity to work. She was now "am chnobble" (pondering a problem) full-time, gave talks to other mathematicians at universities, and made good progress – at the cutting edge of contemporary mathematics.
Roth's past as well as future work was to have a strong and lasting influence on mathematicians working in this area. Her Swiss cheese set has been modified (to an entire variety of cheeses); the fusion lemma which appeared in her 1976 paper influenced a new generation of mathematicians worldwide.

A: Perhaps not as well known is the story of Wei-Liang Chow, see e.g. https://mathshistory.st-andrews.ac.uk/Biographies/Chow/
According to Chern, it was certainly difficult for anyone to come back to research after years of hiatus. (Chern himself was cut off from latest research in Europe/America for several years.)
A: Not a pure mathematics example, but a famous example in the sciences is Nettie Stevens, a US geneticist who discovered sex chromosomes.
Born in 1861, she taught at a high school for many years before returning to further education and obtaining her Master's degree in Biology in 1900 and her PhD in 1903.  She continued as Reader in experimental morphology for a year and worked at Bryn Mawr as an Associate in experimental morphology, publishing 38 articles (some of them of major significance in the field).  She tragically died of breast cancer aged 50 in 1912.
A: I hesitate to posit myself as an example, but I was out of academia from 2001 to 2019, when I decided to become a stay-at-home dad while my wife became the breadwinner. (I won't go into the details of why I feel our decisions were the correct ones, but I'm satisfied they were.)
For a few years I didn't do a whole lot of mathematics, but it's never left me entirely. I began to get slightly more involved around 2004, especially after seeing some of my earlier work talked about. The n-Category Café, MathOverflow, and the nLab became important to me during the years 2006-2019; they kind of kept me going, as I carved out time to do mathematics. I didn't do research in the sense of writing papers (at least not much), but these activities nevertheless helped me keep some of my tools sharpened and to continue learning mathematics.
In every such case, whether it be Villani or myself or anyone, I think it's possible to return to mathematics research, if the sirens keep calling and the mind is still fit for it. In such cases, it's mostly a matter of desire. And, of course, time.
A: According to wikipedia article on Yitang Zhang, he had a long pause from 1991 to 1999, after obtaining his phd. During this period he had multiple jobs outside academia. In 1999, he obtained a position as a lecturer at the University of New Hampshire, with only one publication in 2001 until his important work on bounded gaps between primes, published in 2014 in Annals of mathematics.
A: It is hard, but definitely possible with the right motivation. The Gaussian correlation conjecture was a major open problem in Probability and convexity, until it was solved by
https://en.wikipedia.org/wiki/Thomas_Royen, a retired statistician.
And a very different example: If you search for the publications of James Simons at Mathscinet (which are arranged in reverse chronological order), you will find the following two adjacent publications, with only one 1992 interview noted in the intervening 23 years:
[1] Simons, James; Sullivan, Dennis Axiomatic characterization of ordinary differential cohomology. J. Topol. 1 (2008), no. 1, 45–56.
[2] Cheeger, Jeff; Simons, James Differential characters and geometric invariants. Geometry and topology (College Park, Md., 1983/84), 50–80, Lecture Notes in Math., 1167, Springer, Berlin, 1985. (Reviewer: P. Molino)
The 2008 paper was followed by a number of other  significant joint papers by Simons and Sullivan.
A: Grothendieck is indeed a very good example.
After leaving the mathematical community partly because :

In the month of November, 1969, I discovered that the Institut des Hautes Études Scientifiques, where I have been a professor essentially since its founding, had been receiving subventions from the Ministère des Armées for three years. Already as a young researcher, I found it extremely regrettable how few qualms the majority of scientist had in agreeing to collaborate in one form or another with military institutions. My motivations back then were essentially of a moral nature, and thus not very likely to be taken seriously. Today they acquire a new force and dimension, given the danger of destruction of the human species threatened by the proliferation of military institutions and of the means of mass destruction that they posses. I have explained my thoughts on these problems, which are much more important than the advancement of any of the sciences (mathematics included), in more detail in other places. 
SGA 1, Intro

He devoted himself first to ecology then education, Meditation, Buddhism,...
Then in 1981 one of his major passions (the other being women and meditation) reawake in the form of a vast mathematical reflection with "La Longue Marche à Travers la Théorie de Galois", after this he would not refuse this passion for mathematics anymore (Pursuing stacks, Récoltes et Semailes, Dérivateurs, Esquisse...).
The "Esquisse d'un programme" is a research program submitted to CNRS in 1984.
In those last years, Grothendieck would do mathematics as "a spiritual adventure".

My personal view of the question and this answer is that those pauses are connected to the form we come back, maybe with long pause mathematics as a sport (trying to finish first something) is certainly very hard, but long pauses are healthy for a more wise vision and deeper perspective.

A: I feel that Villani wants to do something for the society now. He also admitted that he has been entirely away from mathematical research.
It does not matter for a well-trained mathematician to gap for a period of time, as long as they still have strong motivation and have clear goals to continue to pursue.
