Doing a master's degree after PhD. Is it advisable? I have a Master's degree in Materials science and am soon to finish my PhD in computational materials science. I am fairly well versed in programming (python, MATLAB, FORTRAN), linear algebra, calculus.  While pursuing my PhD, I got exposed to machine learning and got fascinated by the possibilities of utilizing it properly in my field of study. I have done courses on Coursera (Andrew Ng course), Bayesian statistics, another ML course in Udemy and have gained a good insight into the process. But, I have not yet solved any big problem or developed the knowledge or confidence required to properly implement ML into my work. 

I was thinking if I could pursue a master's degree after completing my PhD as that would give me proper structured know how and would provide me with tools to actually be able to include it in my field of study. 

I realize that, I  should have taken some actual courses while staying in university. But, I did not get the time to go for these. Now that I am about to complete my degree, I was thinking whether a master's degree a possibility for me or not? Also, my aim is to be in academia, so will this help me?

Also, if there's another alternative way to achieve my goals, I will delighted to know about them.
I think a postdoc would better suit your purposes. The benefit is just not there to pursue a masters degree. Further, unless you are trying to go into a field that requires that specific degree as a prerequisite for entry, you can easily teach yourself from open source material. 

The benefits of a postdoc are that it allows you to make a transition in your academic career while getting paid better than a graduate student. You also do not have the pressure of course work or degree requirements. 

I used my postdoc to strengthen my programming skills, begin work in machine learning, and to expose myself to bayesian statistics. This sounds pretty similar to where you are at.