I assume you mean "flipped," not "tapped."
Erayo has a triggered ability that triggers when the 4th spell is cast. Abilities only work while the object they're on is on the battlefield unless something specifically says otherwise, or it can only actually work from some other zone. Erayo's ability only works on the battlefield. So if it's not on the battlefield when that 4th spell is cast, the ability won't trigger.
Can he be the 4th spell cast? As in you go mox, mox, mox, erayo, does he come into play tapped? Or must he be cast before the 4th spell?
Thank you.