I would argue Sony, even if they both lost tons of money and got outsold by the Wii.
MS made great strides in this gen and set themselves up to make even better strides and maybe cement their place as the console of choice in the US and UK, but followed this gen up by royally fucking things up with the Xbox One. All the 360 momentum was gone, it's now irrelevant.
I also give it to Sony because of how the gen progressed. Because they were losing the sales battle and third party companies struggled on their system, Sony really went to work on making quality titles and new IP's, something they sadly lost this gen because they never needed it. And while Sony was pumping out good games, MS went all in on Kinect and basically abandoned the hardcore gamer outside of Halo/Gears/Forza and some XBLA titles that were fantastic but were no replacement for quality full featured titles. I actually went from being a hardcore 360 user to barely touching it the last year or two unless a great game came out and was instead playing lots of titles on PS3. Also PSN was complete and utter doodoo but it was free, this also helped.
When you look back at the end of last gen it's really not much of a surprise how this gen started. MS ended last gen going all in on Kinect, abandoning hardcore gamers and focusing less on the core gaming experience. They entered this gen even further abandoning the core gamer experience and surprising us all by how out of touch they were. Sony ended last gen focusing on the hardcore gamer and the core experience and continued that into this gen so of course it was an easy transition for them, made even easier but how massively MS was fucking things up. They were able to sneak PS+ MP requirement in with zero backlash because well hey, could be worse, look at Xbox One.
So yeah I'd give it to Sony.