On the surface, this question sounds unanswerable.
What do we know about Lamech? He lived 777 years, dying approximately 5 years before the flood. Methuselah, Lamech's father, died within a year of the flood (as late as in the flood, but this isn't known). Lamech's lifespan was unusually short (118 years shorter than anyone else whose age at death is mentioned) for that time. Does that provide any clues?
What we know of how God used Noah regarding the flood doesn't suggest to me that he particularly gave his father any comfort. Nothing is said of anything Noah did for his father, nor what his father thought of the long project of building the boat.
Perhaps Lamech was just tired of hard work (Ge 3:17-19) and looked forward to Noah helping him in that burdensome toil.
It seems unlikely to me that Lamech chose this name for Noah with knowledge of the future. It is curious that he is one of a few people quoted (though this, by itself, is not necessarily a mark of good distinction, Ge 4:23-24), but without any other evidence in the text to support it, the simplest answer ties in with God's curse on the man.