In peace I will lie down and sleep, for You alone, O Lord, make me dwell in safety.
Psalm 4:8
Words: Based on John Mason, Spiritual Songs; or, Songs of Praise to the Almighty God upon Several Occasions, 1683, number 10. A Song of Praise for the Morning.
Music: Ellacombe, Gesangbuch der Herzogl. Wirtembergischen katholischen Hofkapelle (Württemberg, Germany: 1784). Adapted & harmonized by William H. Monk in the 1868 appendix to Hymns Ancient and Modern, number 366 (🔊 pdf nwc).
If you know where to get a good picture of Mason (head & shoulders, at least 200×300 pixels),

My God was with me all this night,
And gave me sweet repose;
The Lord watched o’er me while I slept,
And never a fear arose;
So many groaned and wished for sleep,
Until they wished for day,
Slow hours counting all their pains,
But I securely lay.
And through the night, all dangers slept,
No thieves did me affright,
Those evening wolves, those beasts of prey,
Disturbers of the night.
No raging flames nor storms did rend
The house that I was in;
I heard no dreadful cries without,
No doleful groans within.
What terrors I escaped this night,
Which have on others fell!
My body might have slept its last,
My soul awoke in hell.
Sweet rest returned that strength to me
Which labor did devour:
My body was in weakness sown,
But now is raised in power.
Lord, for the mercies of the night
My humble thanks I pay,
And unto Thee I dedicate
The first-fruits of this day.
Today I praise Thee, O my God:
And will through mortal days;
Then let me in eternal song
Sing Thy immortal praise.