To me it seems probable that Prowse put two and two together faster than anyone else in the cast - and then talked endlessly to magazines about his personal theory as to what was likely to happen in ESB, rather than keeping quiet for the sake of maintaining the surprise.
I have a hard time believing Prowse figured it out based only on the first movie since Lucas doesn’t seem to have decided to make Anakin and Vader the same person until the ESB 2nd draft. Though it does suddenly occur to me that Vader could be Luke’s father without Vader and Anakin being the same person.
I could believe perhaps that Prowse just made it up, and it coincidentally turned out to be true.