Well, if we break down the theory behind a heartless, it's the heart, and by extention soul, given a body by the darkness. A nobody is just the left over carcass.
When Sora was turned into a heartless, he lost his body as it evolved to become Roxas (I choose you! Go, Roxas!). With that happening, we got the adorable little Shdaow Sora. I thought he'd be a higher ranking heartless though. Like a Neoshadow or something.
Anyways, when Kairi gave him a hug, we can assume that her light exorcised the darkness embodying Sora, thus leaving a heart without a body to return to, as they hadn't been seperated long enough for the connection to be restablished. This left Sora to be embodied by the light, giving him a...sentient, I'll say, body.
Then through the events of CoM, he'd be uncorruptable in a way. When he went to sleep, we can assume that the light energy was redirected towards stablizing his heart and form until the connection with Roxas could be established.
In this, that would leave Sora a walking heart. Heartless are creatures of the darkness given form and a heart. Just speculation though. We'll never really know.