The Middle Ages are usually considered to have started after the "Fall of Rome." Typically referring to the 410 sack of Rome.
As Justinian was responsible for the last attempts to reunify the Western and Eastern Roman Empires, you can also consider his reign to be the true end of Rome and thus the start of the Middle Ages.
There's no true distinction between the ages, and even of you consider the fifth century the "start" you're likely to view the Justinian Plague as one of the "starting points."
obviously any distinction between an age will have to be human made, and not true in the sense of earthquakes or the composition of a molecule.
that said, I doubt anyone thinks the middle ages was all exactly as bleak as the worst year in history, because that would negate the reason for having something you could call the worst year in history.