This won't make sense to anyone who hasn't read the novels and only seen the anime.
___SPOILER___
There's a point in the story where Mikuru takes Kyon back 3 years into the past and then loses her time machine, so to get back to the present they stay with Nagato, who has them sleep in a room together and freezes time around them for three years