For our purposes, I wanted to focus on, specifically, the staying awake for Shavuos. Horowitz writes "The vigils of Shavuot and Hoshana Rabbah, previously limited in their appeal and relatively brief duration, came to be widely observed as all-night affairs. This was due more to the availability of coffee than to the habit of frequenting coffeehouses..." (44). In regards to the development of the custom in the 16th century, it had "spread, by the century's end, among the adherents of kabbalistic piety in Safed and elsewhere in the land of Israel" (36).
I suppose a good follow-up post to this one would be texts which demonstrate this (although in note 21 Horowitz makes a reference,* this reference is to the account and not necessarily to texts about the custom's development or place in halakhah).
As an introductory remark to his article, Horowitz makes an observation in regards to sleep and the nighttime that
Where coffee spread it extended the range of possibilities for making use of the night hours, whether for purposes pious or profane (and, as we shall see, these were not mutually exclusive). Where it did not, the night remained considerably less malleable and less susceptible to human initiative. (18)*Horowitz' note 21: "For an annotated English translation of Alkabetz's account, see Louis Jacobs, Jewish Mystical Testimonies (Jerusalem, 1976), pp. 99-104. For the sources in which it originally appeared, see ibid., pp. 99, 118, and R.J.Z. Werblowsky, Joseph Karo: Lawyer and Mystic (Oxford, 1962), pp. 2, 19-22."