The Temple of Time is one of those things that still confuses me. It jumps from being in the Lost Woods, to Castle Town, back to the Lost Woods, and now presumably on the plateau. That's not counting the original in Lanayru Desert, of course.
My best guess is that there's two temples: the Lanayru temple that's in ruins in Skyward Sword, and the Faron temple that Link puts the Master Sword into at the end of Skyward Sword.
Between Skyward Sword and Ocarina of Time, the Lanayru temple was rebuilt into the one seen in Ocarina of Time, and the sages decide that the Master Sword might be safer there, so they put it behind the Door of Time there. But then Ocarina of Time comes along, and in all the timelines the sages decide that maybe they shouldn't put the sword in the Lanayru temple, considering how easily Ganon broke/nearly broke into there.
In the Adult timeline, they decide they'll just hide it under the castle. Not sure why. In the Child timeline, the sages decide to move it to the Faron temple; still not sure why. In the Decline timeline they decide that nobody ever needs to get this thing again unless it's really bad, so they hide it in the forest, put a bunch of decoys in the forest, and also hide the magic rocks from Ocarina of Time all over the place in such a manner that a nine-year-old can't get them by asking nicely.
I can't explain why the sages like moving the sword so much, but it makes more sense than the Temple of Time magically warping all over Hyrule every couple hundred years.