According to tradition, the Mahayana sutras were taught to the Bodhisattvas, and then kept hidden in the naga realm until the proper time.
This might seem farfetched, but the nagas act as Dharma protectors in the Pali canon:
Modern physics is close to accepting that there are alternative realms of existence:
Contemporary Buddhist scholars tend to speculate the Mahayana sutras were received in states of meditative samadhi. How can we know that these meditation masters, in profound samadhi states, weren’t accessing previously unpublished sutras from the naga realm?