In peace I will both lie down and sleep; for thou alone, O Lord, makes me dwell in safety. Psalm 4:8
For the weary doctor and for the worried patient there should be some balm in the psalmist's words and in what follows:
O soft embalmer of the still midnight,
Shutting with careful fingers and benign
Our gloom-pleased eyes...
Turn the key deftly in the oiled wards,
And seal the hush'd casket of my soul.
Keats, To Sleep
The condition which it is most essential to secure is peace of mind. Almost all insomnia is mental in origin, due to some worry, remorse, ambition, or other system of emotional ideas which obsess the mind. In this connection, it is possible only to repeat the proverbial advice about not letting the sun go down upon one's wrath... If, despite our best efforts, sleep is slow in coming, the wise person does not worry. To miss a little sleep does no one any harm, provided he remains calm.
C R McRae, in his book Concerning You and Me
Sleep quietly in this quiet room,
O thou -- whoe'er thou art --
And let no mournful yesterdays
Disturb thy peaceful heart:
Not let tomorrow mar thy rest
With dreams of coming ill.
Thy Maker is thy Changeless Friend:
His love surrounds thee still.
Forget thyself and all the world,
Put out each garish light.
The stars are shining overhead --
Sleep sweetly, then. Good night!"
Watch thou, dear Lord, with those who wake, or watch or weep tonight, and give thine angels charge over those who sleep. Tend thy sick ones, O Lord Christ. Rest thy weary ones. Bless thy dying ones. Soothe thy suffering ones. Pity thine afflicted ones. Shield thy joyous ones. And all for thy love's sake.
Be present O merciful God, and protect us through the silent hours of this night; so that we who are wearied by the changes and chances of this fleeting world, may repose upon your eternal changelessness.
Further reading: Ps 121.