In Ecclesiastes 5:12 - "The sleep of a laborer is sweet, whether he eats little or much, but the abundance of a rich man permits him no sleep." I've noticed in my own life when I have really worked hard during the day, the bed is so welcome and I'm asleep in minutes. A good day of work allows sleep to come easily. However, I also notice when I go out and eat something really rich, that rich foods lie on my stomach so heavily that it doesn't allow me to fall asleep until in the early morning hours. Also this verse may mean that the rich worry in the night hours about protecting his riches or about the possibility of losing his riches which might bring sleepless nights, as well. In reverse, the poor may lie awake at night wondering where the next meal will come from for his family or how to pay the bills when they become due. So many reasons we can lie awake at night needlessly.
Sometimes when Dick is away from home overnight, I don't sleep well. I stay awake listening at all the noises that I usually don't hear at all when he is with me. Psalm 4:8 reminds us that God is our safety: "I will lie down and sleep in peace; for you alone, O Lord, make me dwell in safety." Proverbs 2:23-24 also speaks of sweet sleep: "Then you will go on your way in safety, and your foot will not stumble; when you lie down, your sleep will be sweet. Have no fear of sudden disaster...for the Lord will be your confidence."
When we do find ourselves awake at night and sleep just refuses to come, here is a good way to pass the time: "My eyes stay open through the watches of the night, that I may meditate on your promises." (Psalm 119:148) Let your mind dwell on verses that you have learned that might ease your mind and allow peace to come. Then even if you don't sleep, your body and mind will be rested and not agitated. Philippians 4:6-9 reminds us to dwell on the true, the noble, the right, the pure, the lovely, and the admirable. Don't be anxious about anything, but present your requests to God and then the peace that passes all understanding will fill our minds, and the God of peace will be with us.
I think also that sometimes God awakens us in the night hours and places someone immediately on our minds that He wants us to pray for. Sometimes God does that to me with people I haven't even thought of for days, months or even years. I take that as a sign that they need prayer and God has awakened me to be the one to pray for them. His ways are not our ways.
And lastly, always remember that God never slumbers or sleeps. "He will not let your foot slip--he who watches over you will not slumber; indeed he who watches over Israel will neither slumber nor sleep....The Lord will keep you from all harm--he will watch over your life; the Lord will watch over your coming and going both now and forevermore." (Psalm 121:3, 7-8)
Sweet dreams and may your sleep always be sound!