Dumbledore and Flamel remove the stone from Gringotts in the summer before Harry's first year at Hogwarts.
Dumbledore hides it in Hogwarts, with one of his most wonderful ideas: only someone wanting to find the stone, not wanting to use it, can get it.
It was one of my more brilliant ideas, and between you and me, that's saying something. You see, only one who wanted to find the Stone -- find it, but not use it -- would be able to get it, otherwise, they'd just see themselves making gold or drinking Elixir of Life.
(Philosopher's stone, Chapter 17, The Man with Two Faces)
But at that time, Flamel intends to keep on using the long life elixir for his wife and him. They only decide to stop and accept Death after Harry's and Voldemort's second encounter at the end of 1st year.
As for the Stone, it has been destroyed."
"Destroyed?" said Harry blankly. "But your friend -- Nicolas Flamel --"
"Oh, you know about Nicolas?" said Dumbledore, sounding quite delighted."You did do the thing properly, didn't you? Well, Nicolas and I have had a little chat, and agreed it's all for the best."
"But that means he and his wife will die, won't they?"
"They have enough Elixir stored to set their affairs in order and then, yes, they will die."
(Philosopher's stone, Chapter 17, The man with two faces)
When they hid the stone, how did Dumbledore and Flamel think Flamel would get to the stone once his little stock would be depleted?
- Nor Nicolas nor his wife could have got it from the mirror, since they would have intended to use it.
- Dumbledore probably could not have got it either, cause he would have been in the case "I don't want to use it for myself but I want to get it for a friend of mine to use", and this option was probably forbidden too, else Quirrel would have managed to get the stone for Voldemort to use.