The last time we were together sexually, I knew about the sites and his ED was very bad. Is it related do you think?
it could be.
your ex sounds like he may have struggled with intimacy.
hookup sites, or cyber sex can fulfill a sexual need, but at a distance.
likewise, he may have felt that struggle in real life, and that could certainly affect his performance, hence "losing it" so to speak.
and if all of thats the case, it can become a sort of insidious cycle, and the online stuff can get pretty addictive.
you mention youre still in a relationship...are the two of you together, or broken up?