Humans preferentially recall items that are presented in close temporal proximity together -- a phenomenon known as the "temporal contiguity effect". In this study, we investigate whether this phenomenon emerges naturally when training a recurrent neural network with episodic memory on free recall tasks. The model learns to recall items in the order they were presented, consistent with the human contiguity effect. The strength of this effect predicts the performance of individual networks, mirroring experimental findings in humans where stronger contiguity effects predict higher recall performance. The contiguity effect in the model is supported by a neural representation of item index, resembling the `method of loci'. This differs from prominent computational models of human memory, which use a slow decay of past information to guide sequential retrieval. Our findings provide insights into the mechanisms underlying episodic memory and pave the way for future studies of its interactions with other cognitive processes.