This is "Lost and Found" on The Twilight Zone from 1985.
Jenny Templeton is a young college student who discovers that things around her are disappearing. For example, her trash is empty after having filled it with her old notes and her political science book is missing and then reappears. She accuses her roommate Kathy of playing a prank on her, and then realizes that not only are her study books missing but her high school year book and other items are absent as well.
Suddenly, she hears a noise in her closet and thinks someone might be hiding inside. Kathy thinks Jenny is hearing things and she jokingly opens the closet only to reveal two weirdly-dressed people, out-of-sync and draped in light who return her pencil mug. They tell her that they didn't want to take anything that would have been missed.
Apparently, the two are a pair of time travelers from 2139 and they apologize to Jenny for any inconveniences they may have perpetrated on her. While they discuss how foolish they have been, they inadvertently reveal that Jenny will become the first president of Earth and she will be called "The Great Peacemaker." After the woman returns to 2139 and the man goes back to 32 B.C. to see Cleopatra (the woman warned him if he did this he "shan't bother coming home.") Kathy stands in shock while Jenny thinks that she maybe shouldn't cut her political science class anymore.
Found by searching for twilight zone time travelers in closet
Full episode (for now, at least):