I think that you do need to "retrain" him. I would "ban" him from the bedroom except when you are there and awake to prevent "accidents."

He's obviously a little confused and upset - his world has changed rather dramatically several times recently. He is neutered, right? If not, he could be "marking" territory, claiming the bed as his?

If his litterbox is going to be in the basement, I guess he needs to sleep in the basement, at least for now. What is going to happen when you are on vacation?

You could, by the way, to "save" your mattress, buy a waterproof mattress cover, they have them for incontinent adults. That way it's just the sheets that "get it" and not the mattress. This isn't a permanent solution, but it might help until life settles down for your poor confused cat!