The scriptures say that all the saints that die before the second presence of Christ will remain in the grave until his return. (I Thessalonians 4:16) The order of resurrection is also spoken of as the sounding of the last trumpet when the dead shall be raised. (I Corinthians 15:51-52). These scriptures show that the resurrection of the dead will occur after the return of Christ. However, there is one account in Matthew 27 that, because of the way it is translated, appears to contradict the order of resurrection. ​
Matthew 27:51-53 (NKJV) reads, “Then, behold, the veil of the temple was torn in two from top to bottom; and the earth quaked, and the rocks were split, and the graves were opened; and many bodies of the saints who had fallen asleep were raised; and coming out of the graves after His resurrection, they went into the holy city and appeared to many.” ​
The expressions “out of the graves (tombs)” and “out of the tomb” are used in other contexts in the New Testament. It is twice used in the singular (tomb). When Lazarus was raised, he was “called…out of the tomb” (John 12:17). And when Mary Magdalene looked for Jesus’s body, she surmised that “they have taken away the Lord out of the tomb.” In both cases, someone is coming out from inside a specific tomb.​
Tombs plural is used in Matthew 8:28 when two demoniacs were “coming forth out of the tombs” and in Mark 5:2 when a man with an unclean spirit comes “out of the tombs”. Clearly, none of these three was dead. So the expression merely means these were in a cemetery, and not necessarily dead, inside a tomb (empty or not). Luke 8:27 also speaks of a demoniac who “abode… in the tombs”, when he certainly was not dead.​
Second, in verse 53, it says “after his resurrection.” This verse does not read “after their resurrections.” So it does not mean those in the cemetery were raised from death. This is referring to the time after Jesus’ resurrection.​
Finally, the “saints” here cannot refer to the faithful ones of the Old Testament. The spirit-begotten saints of the New Testament precede the holy ones of Israel in the order of the resurrection. Hebrews 11:39, 40 clearly teaches, “they (these holy ones of Israel) without us should not be made perfect.” Hebrews 11:39,40. Thus the “saints” were probably the ten apostles and other faithful followers. They were hiding in the cemetery because they were fearful of the Roman soldiers.
In summary, the “saints” had been so tired after the Last Supper that they could not watch one hour without falling asleep. They had fallen asleep, and the earthquake awakened them. Then they came out of a cemetery (tombs). They remained fugitives from the city of Jerusalem until after Jesus was resurrected.