In 1949 Kurt Godel proposed a solution to Einstein's general relativity equations that allowed for closed time-like trajectories. It is known now to be one instance of cosmological dust models. Einstein apparently was not enthusiatsic; details and the story are easily found e.g. in Yourgau's book (2005).
On a more grand scale Roger penrose has proposed his Conformal cyclic cosmology which is what its name precisely says: the future time-like infinity of each previous iteration being identified with the Big Bang singularity of the next. It has been exposed in series of papers found at the arxiv.
The idea of creating a cycle or a return by matching beginning with end has been explored at some length by the greeks stoics (see Hahm's Book): they imagined a universal conflagration in which everything is reduced to ashes and then gradually a world develops, people appear, thing happen until a great fire reduces evrything to ashes...
A problem with such a construction is that it leaves no room for an external observer who could state that a return occurs. The ancient thinkers discussed at some length are the items (people included) exactly the same or indeed materially the same or only approximately.
Nietzsche of course knew about the ancient theory but apparently had an impressive experience of "deja vu": experiencing being different from knowing he started advertising it as his own discovery. Actually in the same decade Auguste Blanqui and Gustave Le Bon proposed an other kind of eternal return, based on exhaustion of combinations allowed by atoms.
[Refs]: Yourgrau, Palle (2005). A world without time: the forgotten legacy of Gödel and Einstein. New York: Basic Books.
David E. Hahm. The Origins of Stoic Cosmology. Ohio State University Press, 1977.
Auguste Blanqui, L'eternite par les astres, 1872