I have seen some guides around like this one and some videos about it on YouTube so it is definitely possible, would it be worth it though? I'm not sure.
I feel like it would be less hassle to just get a frameset that supports them as standard.
Bearings are a pretty common part that can be bought in various qualities across all sizes, I dont feel like you are going to be getting a significantly smoother ride just from upgrading to through axles, it is more about the stiffness and alignment that is gives the wheel. If you wanted just a smoother ride, like another commenter said, I feel like you'd get more bang for your buck from properly servicing and upgrading the bearings you have or buying a better quality wheelset.