Asimov was a chemist so he had an awareness, possibly expertise, in statistical mechanics and the kinetic theory of gases. Not hard for an sf writer to extrapolate psychohistory from that.
I believe he mentions that specifically every time someone asks why can't psychohistory be used to predict the future of individuals.