"And the rain was upon the earth forty days and forty nights." (Genesis 7:12)
There are nine forty-day periods in Scripture, but on only five of these the notation "and forty nights" is added. On the other four occasions (the spies in Canaan, Goliath's challenges, Jonah in Nineveh, and the post-resurrection ministry of Christ) we can assume that the activity ceased at night. But on these five it continued unabated.
The first of these was the great Flood. The most intense rains ever experienced on the earth poured torrentially, night and day. One can visualize the stress-filled nights for Noah's family, with the cries of the dying outside, and no light of the sun or moon to pierce the outer darkness. But, of course, they were all safe in God's specially designed Ark.
Many years later, Moses twice spent forty days and forty nights in the awful presence of God on Mount Sinai, receiving the divinely-inscribed tablets, with the Ten Commandments and all the laws of God. The mountain was intermittently quaking and breathing fire and smoke while he was there, and the nights were surely more awesome even than the days, but God was there!
Elijah spent forty days and forty nights traveling back from Beersheba to Sinai, even though this relatively short journey would not normally require forty days. Evidently Elijah experienced great hardships and obstacles along the way and many sleepless nights, but God met him again at Sinai, and it was worth it all.
Finally, the Lord Jesus (God Himself!) was "led up of the Spirit into the wilderness to be tempted of the devil . . . forty days and forty nights" (Matthew 4:1-2). In weakened human flesh, without food or rest, this was a greater trial than any of the rest, but He was triumphant, and then the "angels came and ministered unto him" (Matthew 4:11). HMM