I know there are problems (especially for Christians) with Nietzsche’s Übermensch leading to the ‘death of God’ in Thus spoke Zarathustra, but, amidst the philosophising, there are some practical tips (below) for the insomniac.
The Psalms are equally wise:
Psalm 3.5-I lie down and sleep; I wake again, for the Lord sustains me;
Psalm 4.1,8-When you are disturbed, do not sin; ponder it on your beds, and be silent. . . . I will both lie down and sleep in peace; for you alone, O Lord, make me lie down in safety;
Psalm 127.2-It is in vain that you rise up early and go late to rest, eating the bread of anxious toil; for he gives sleep to his beloved.
Friedrich Nietzsche (1844-1900). Thus spake Zarathustra: a book for all and none. Tr. Thomas Common, 1909. Wordsworth Editions, 1997, p. 24:
People commended unto Zarathustra a wise man, as one who could discourse well about sleep and virtue . . . [a]nd thus spake the wise man:
“Respect and modesty in presence of sleep! That is the first thing! And to go out of the way of all who sleep badly and keep awake at night!
“Modest is even the thief in presence of sleep: he always stealeth softly through the night. Immodest, however, is the night-watchman; immodestly he carrieth his horn.
“No small art is it to sleep: it is necessary for that purpose to keep awake all day.
“Ten times a day must thou overcome thyself: that causeth wholesome weariness, and is poppy to the soul. Ten times must thou reconcile again with thyself; for overcoming is bitterness, and badly sleep the unreconciled. Ten truths must thou find during the day; otherwise wilt thou seek truth during the night, and thy soul will have been hungry. Ten times must thou laugh during the day, and be cheerful; otherwise thy stomach, the father of affliction, will disturb thee in the night.
“Few people know it, but one must have all the virtues in order to sleep well. Shall I bear false witness? Shall I commit adultery? Shall I covet my neighbour’s maidservant? All that would ill accord with good sleep.
“And even if one have all the virtues, there is still one thing needful: to send the virtues themselves to sleep at the right time. That they may not quarrel with one another, the good females! And about thee, thou unhappy one!
“Peace with God and thy neighbour: so desireth good sleep. And peace also with thy neighbour’s devil! Otherwise it will haunt thee in the night.
“Honour to the government, and obedience, and also to the crooked government! So desireth good sleep. How can I help it, if power like to walk on crooked legs?
“He who leadeth his sheep to the greenest pasture, shall always be for me the best shepherd: so doth it accord with good sleep.
“Many honours I want not, nor great treasure they excite the spleen. But it is bad sleeping without a good name and a little treasure.
“A small company is more welcome to me than a bad one: but they must come and go at the right time. So doth it accord with good sleep.
“Well, also, do the poor in spirit please me: they promote sleep. Blessed are they, especially if one always give in to them.
“Thus passeth the day unto the virtuous. When night cometh, then take I good care not to summon sleep. It disliketh to be summoned-sleep, the lord of the virtues!
“But I think of what I have done and thought during the day. Thus ruminating, patient as a cow, I ask myself: What were thy ten overcomings? And what were the ten reconciliations, and the ten truths, and the ten laughters with which my heart enjoyed itself? Thus pondering, and cradled by forty thoughts, it overtaketh me all at once-sleep, the unsummoned, the lord of the virtues.
“Sleep tappeth on mine eye, and it turneth heavy. Sleep toucheth my mouth, and it remaineth open. Verily, on soft soles doth it come to me, the dearest of thieves, and stealeth from me my thought stupid do I then stand, like this academic chair. But not much longer do I then stand: I already lie.”