Ocon worked alongside six-time F1 champion Hamilton during his year as a Mercedes reserve driver in 2019.
Speaking at the launch of his new employer Renault's 2020 campaign, Ocon said he found the experience of working with Hamilton and his teammate Valtteri Bottas "very useful" - and revealed Hamilton had aided him in coping with career uncertainty.
"I came out of my environment, with my experience, driving, using stuff, knowing what's best, what's not, and then going to see how they [Hamilton and Bottas] do their things [was] definitely very, very useful for me," Ocon said.
"On the other side also, I had a good chat with Lewis, who gave me good advice - not really the sport side, more the managing side, and the moment where it was a bit crucial, where there were discussions [for 2020] but nothing signed.
"He knew how to give me good words and gave me directions, where to go, and definitely, yeah, among a lot of people he was also a good teacher in all those paths."
Esteban Ocon, Renault F1 Team R.S.20
Andrew Hone / Motorsport Images