Castle Oblivion is linked to DiZ's mansion. The way that Castle Oblivion comes across is that it is, outside the realms of the worlds and is infact inbetween the darkness and light. DiZ's mansion is infact the bridge between the gaps. Sora fell asleep in DiZ's mansion, which is infact linked to Oblivion.
It's quite complicated but when you think about it, it makes perfect sense.