All perfect praise be to Allah, the Lord of the worlds. I testify that none is worthy of worship except Allah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and messenger.
Wet dreams do not affect fasting according to the agreement of scholars. The Kuwaiti Fiqh Encyclopedia states:
Wet dreams do not affect fasting and do not invalidate it by consensus because the Prophet, sallallaahu ‘alayhi wa sallam, said, “Three things do not break the fast of the fasting person: cupping, vomiting, and the wet dream.” That is because it is hard to abstain from it except by abandoning sleep, whereas sleep is permissible and abandoning it is not possible, and because there was no actual intercourse or ejaculation resulting from lustful sexual contact. It has no effect on Hajj as well by consensus.
This ruling is not affected by the fact that ejaculation only occurred after wakefulness because you did not intend what happened and because if a wet dream occurs during sleep, one cannot control ejaculation after wakefulness.
You were supposed to complete your fasting and not break it and to ask the people of knowledge about the rulings that you do not know in the matter of your religion and acts of worship. It is impermissible that one does something until he knows the ruling of Allah Almighty concerning it.
As long as you did what you did, you should make up for the day – as you did. You should also repent to Allah Almighty from this deed.
Allah knows best.