Is it advisable to do a postdoc in statistical genetics after a statistics PhD in machine learning/deep learning?
A big part of the PhD degree is that you have learned to learn.  If you have a PhD in statistics/machine learning then I see no reason that you could not rapidly learn the material required for statistical applications in medicine/genetics.  So long as you are doing statistical things (e.g., statistical genetics as opposed to the biology/medical aspects) then this falls very close to your existing expertise, and the additional learning is likely to consist primarily of learning new statistical distributions/models, which will be something you are well trained to do.
To the extent you need to learn genetics to understand the statistical models applying to genetics (which is much less than you might think), you ought to be able to learn the basics rapidly enough to communicate with geneticists in your projects.  Most of your work is likely to be interdisciplinary, where you do the statistical work and geneticists do the genetics work.  Likewise, if you publish in this field then the geneticists will write up all the parts of the paper pertaining to their subject and you will write up the parts of the paper pertaining to your subject.
One of the great things about statistics is that you can enter a field and assist with data analysis with surprisingly little background in the subject.  You often need to learn the basics, and interrogate the problem to learn how the data is being sampled, etc., but the burden is smaller than you might imagine.  Moreover, other applied statisticians have written books in these fields that introduce the statistical models of interest, with the relevant scientific background for the field, so you can pick it up quickly.  Statistical genetics requires you to know just enough about genetics to understand why the statistical models are formulated the way they are (which is very little) and then the rest is standard math/stats work that is squarely within your training.  Take heed of the immortal words of the great John Tukey: &quot;The best thing about being a statistician is that you get to play in everyone's backyard.&quot;