The encoding specificity principle of memory (Tulving & Thomson, 1973) provides an general theoretical framework for understanding how contextual information affects memory. Specifically, the principle states that memory is improved when information available at encoding is also available at retrieval. For example, the encoding specificity principle would predict that recall for information would be better if subjects were tested in the same room they had studied in versus having studied in one room and tested in a different room.
Have you ever been upstairs, wanted something that is downstairs, gone downstairs and then forgotten what you wanted. In fact it is only when you go back upstairs again that you remember what it was that you wanted.
When you store something in memory, the memory is not just of the item being stored but also the context in which the memory occurred. Recall and recognition thus may be triggered by elements of the context being present.