Dean escaped Purgatory, followed by Castiel sometime later. The angel had wanted to stay in there to atone for the things he'd done, especially to Sam.
His friendship with Dean had strengthened in Purgatory, which made it harder when Naomi ordered Castiel to kill Dean. He couldn't do it, couldn't kill his friend.
Sam was busy with the trials. They were slowly killing him, but Sam didn't care. He only wanted to shut the gates of Hell.
Castiel hated that Sam was suffering. All he could do was lie in the bed next to the pale, sick Sam, and comfort him.
"You'll be okay, Sam," The angel said softly.
Metatron tricked Castiel into completing some separate trials, then tied Castiel up and stole his grace, releasing the angels.
