When darkness long has veiled my mind. W. Cowper. [Peace.] First published in R. Conyer's Collection, 1772, in 4 stanzas of 4 lines, and headed “Trials overcome by Hope." When included in the Olney Hymns, 1779, Bk. iii., No. 23, it was expanded into 6 stanzas of 4 lines, and headed, "Peace after a Storm." In its full, or in an abbreviated form, it is found in several hymn-books in Great Britain and America, both old and new. Although not referred to, so far as we can find, in Cowper's Memoirs, it was evidently written at or about the same time as his "God moves in a mysterious way."
--John Julian, Dictionary of Hymnology (1907)