It is a 'lil confusing, but they didn't mess it up because it says:
"And the Master Sword sleeps again.... forever."
So since LBW takes place centuries after LttP, the Master Sword was never touched again by the people who lived during aLttP, or their children, or theirs.
To me, when I hear forever, I don't think of eternity, I only think of how far my mind can fathom, which is only around 100 years, because that's all I'll be around for.
So you can look at this way, grandparents are telling the story to all the little village kids of the great hero who saved the world when the grandparents were kids, (Link, from A Link to the Past) and when finishing the story instead of saying,' and they lived happily forever after', they say that the master sword slept forever. (Because it hasn't been used since)
But than 200-500 years later, the events of A Link Between Worlds happened and the Master Sword was than needed again.
Click link below to view image:
C:\Users\alexw_000\Pictures\zelda3-42.png