Cotton, 42, said the man wrote to him on Facebook while he was filming reality TV show Dancing On Ice earlier this year.
He had been forced to leave his family home and resorted to staying in a tent in a stairwell of a council block in Fleetwood, Lancashire.
The actor said he paid for the man to stay in a hotel in Manchester before helping to find housing for him through local homelessness charity Barnabus.
Cotton spoke of his shock when he found out the eerie similarities between his character’s impending storyline and the man’s real-life experience.
He said: “I’d kept this secret (from the Corrie cast) because it was a private thing.
“I rang up and said ‘There’s a really odd line about Sean, he’s lying about this job’. They said ‘He’s going to be homeless’. Our assistant producer said ‘It’s a community story about homelessness’.
“I said ‘Where’s he actually going to live? Whose sofa is he on?’. They said: ‘He’s not going to be on a sofa. He’s going to be homeless, living in a tent’.
“I was like ‘F*** off’. If somebody had said that to me without me going through this I would have said ‘That just does not happen’.
“Turns out it’s true and very spookily it was the identical story. So much so that I had to go back to Barnabus and say ‘I don’t want you to think I’ve come in here for some weird research and I’ve picked up this homeless person online’.”
Cotton said Sean’s pride leads to him sleeping rough as he is too ashamed to tell the truth about his dramatic shift in fortune.
The actor revealed that his mother had told him an uncle of his was pretending to go to work five years after losing his job for a similar reason.
He said he hoped that the three-month storyline would help change wider perceptions about homeless people.
“What’s been a real joy is sometimes, not necessarily this show or other shows, you do issue-based storylines and you can tell it’s purely for the end to drive traffic to a website.
“Fact is sometimes stranger that fiction. For me there’s a real truth in it. It’s a character-based storyline, which we all know Coronation Street does better than anybody else.
“The one thing I hope people will take from it is it can happen to anyone.”