It was not deacons, but "permanent deacons," who disappeared for a while. In this answer I will summarize and quote from an article titled Called to Serve: The Mission of the Permanent Diaconate by Deacon Michael Chesley.
Although the permanent deacon is a relatively new occurrence
experienced on the altars of many U.S. dioceses around the country,
deacons in general are nothing new to the Church.
Chesley summarizes the early development and documentation of the role of deacons. As the catechism says (1570), "Among other tasks, it is the task of deacons to assist the bishop and priests in the celebration of the divine mysteries, above all the Eucharist, in the distribution of Holy Communion, in assisting at and blessing marriages, in the proclamation of the Gospel and preaching, in presiding over funerals, and in dedicating themselves to the various ministries of charity."
However, by the time of Pope Gregory the Great in 595 A.D, many of
these duties already began to be heavily curtailed or delegated to the
minor orders. Although it is beyond the range of this article to
cover a detailed account of the reasons for the decline of the order,
suffice to say that their [sic] was a gradual occurrence of men who
preferred not to remain a deacon all their lives, and wanted to
advance to the higher orders. By the middle ages, the order of deacon
as a permanent rank in the hierarchy of the Church all but disappeared
in the West, and became nothing more than a stepping stone for
preparation to the priesthood. Although not widely known, the Council
of Trent (1545 – 1563) called for the restoration of the permanent
deacon. Unfortunately the idea was never followed through, and it was
not until the Second Vatican Council that the Church in the West took
up the wishes of Trent some 400 years later.
...
Although the Latin Rite Church had "transitional" deacons, the Council
goes on to say that the Church envisions what it hoped would be a
permanent rank reestablished within the Latin Church. One could ask
why did the Church desire to restore the order of deacon as a
permanent rank at this point in church history? The Directory for the
Ministry and Life of Permanent Deacons addresses this question as
follows: "One of the fruits of the Second Vatican Council was the
desire to restore the diaconate as a proper and stable rank of the
hierarchy". On the basis of the "historical circumstances and pastoral
purposes noted by the Council Fathers, the Holy Spirit, protagonist of
the Church's life, worked mysteriously to bring about a new and more
complete actualization of the hierarchy which traditionally consists
of bishops, priests and deacons. In this manner the Christian
community was revitalized, configured more closely to that of the
Apostles which, under the influence of the Paraclete, flourished as
the Acts of the Apostles testifies."*
...
Although for many centuries the deacon ascended to higher orders after
ordination to the diaconate, there still exist "transitional" deacons
and "permanent" deacons. However, there is no sacramental difference
or function between the two. Under normal circumstances, when the
permanent deacon path is chosen, the deacon remains in his chosen
vocation.
Also at Vatican II, married men were permitted to become deacons. Unmarried men becoming deacons are still required to take a vow of celibacy, however.
* Chesley's source for this quote is given as: Congregation for Catholic Education; Congregation of the Clergy; Directory for the Ministry and Life of Permanent Deacons. ( Libreria Editrice Vaticana 1998), Chapter III.