People around the world have practiced this intimate devotion since the 16th century.
Starting around the 16th century, there arose a custom of exposing a consecrated Host on the altar in a monstrance for all to adore for a period of 40 hours. Parishioners would take turns adoring Jesus in the Blessed Sacrament, dividing it up in individual hours. It began as a response to the many sins of the people during the time period and as a way to make reparation for the numerous offenses against God.
St. Philip Neri introduced the devotion in Rome around 1550 and did all that he could to promote it. St. Ignatius of Loyola also promoted the practice and the Jesuits brought it to Germany. In a letter, Pope Clement VIII encouraged the spread of this devotion, writing: “We have determined to establish publicly in this Mother City of Rome an uninterrupted course of prayer in such ways that in the different churches, on appointed days, there be observed the pious and salutary devotion of the Forty Hours, with such an arrangement of churches and times that at every hour of the day and night, the whole year round the incense of prayer shall ascend without intermission before the face of the Lord.”
Read more on https://beecatholic.com