Many reasons for this, probably the most telling being that the Remain campaign thought a win was a dead cert so didn't need to try very hard. The leavers caught the attention of the media because they were passionate, even when some of their claims (such as the notorious "£350 million a day extra for the NHS") were, to put it politely, fanciful. The remainers concentrated on rather less passionate analysis, statistical and economic arguments etc, which are always a media turn-off.
It doesn’t surprise me that the internal coverage/sentiment was as diametrically opposite the external as possible.
True, none of the stay advocates was as charismatic as Nigel Farage, whom I love, but not all do. OK, so that’s one guy, and he’s a superman as far as I am concerned, having fought against the EU for 25 years. But the “stay” proposition was paraded (here) as an economic disaster for each and every stratum of society, from the farmer, to the entrepreneur, to the financial elite, to the clerical worker.
Truly, the lesson is how incredibly distorted media-driven perceptions can be, and are. I don’t think too many Americans thought the exit would be approved. I don’t think too many Americans thought DJT would be elected, whether they voted for him or not.