Captivity had never agreed with Loki, but surviving certainly did. He'd fallen through space for what seemed like an eternity - long enough for the emotion from the display on the Rainbow Bridge to cool, and Loki's natural desire for survival to take over. When the Chitauri finally pulled him from freefall, they'd done things to him - painful, violent things, things that paled in comparison to anything he'd been through before.
But at least he was alive. If you were dead, there was no way things could improve, no way for you to rework your situation. But alive - even tortured and in pain - alive was a chance, alive meant that sooner or later, something would change, and Loki was no stranger to that idea.
Eventually, he gained the chance to strike a bargain with the Chitauri. He would be a king, be free from their torture, and in exchange he would give them Midgard. It didn't matter what he gave up - he only needed to get away, to give the Chitauri something more... imminent to deal with.
That was exactly what he did - he led their forces to Earth, and then let things unravel as they would. It didn't matter that he'd been taken captive again, and it didn't matter by who - it only mattered that it wasn't the Chitauri. Either Midgard's defenders, her "Avengers" would keep him (and defend him; who wouldn't defend their spoils?), or they would send him back to Asgard with Thor - Asgard, where he was disgraced, but he was still a prince.
Maybe he was a prisoner. They certainly made a point of showing him so - the chains at his wrists, the gag, the charm to supress his magic - but at least he was safe. Were anyone to go after a prince of Asgard, even an illegitimate and fallen prince, there would be hell to pay. So while maybe he was in captivity, he would seethe and swallow down his anger, purely to bide his time and wait.
At least this wait was in relative comfort - he was clean, if not dressed to his liking; he was fed, he was given relative peace while he waited. A blank, dull room, but at least he was alive.