I've had 2 cockers (previous golden and current pupster) who both used to toilet in their bed, bad luck on my part I think! I've been told that some dogs just do this, even though the consensus is that they'd rather not. It is very frustrating, disheartening and time consuming dealing with it but when it happens, I remove pup and clean up without saying anything.
I dealt with this problem for nearly 12 weeks with my previous cocker (and believe me, cleaning it up twice a day is soul destroying
) but after doing some Separation Anxiety training with him (which was part of the problem), he suddenly stopped at 20 weeks old.
I am currently doing the same with Archie, my current pup and have good days and bad. I try (as much as possible) to get him to poo before I have to leave him alone, otherwise I am resigned to a potential mess when I get back. As with Odie, my previous cocker, he suffers from SA which in turn leads to him doing it when I'm not in view. I live in the hope that he'll eventually grow out of it soon...