A superstitious number, arising from the Scripture use. Thus Moses was forty days in the mount; Elijah was forty days fed by ravens; the rain of the flood fell forty days, and another forty days expired before Noah opened the window of the ark; forty days was the period of embalming; Nineveh had forty days to repent; our Lord fasted forty days; He was seen forty days after His resurrection; etc.
St. Swithin betokens forty days' rain or dry weather; a quarantine extends to forty days; forty days, in the Old English law, was the limit for the payment of the fine for manslaughter; the privilege of sanctuary was for forty days; the widow was allowed to remain in her husband's house for forty days after his decease; a knight enjoined forty days' service of his tenant; a stranger, at the expiration of forty days was compelled to be enrolled in some tithing; members of Parliament were protected from arrest forty days after the prorogation of the House, and forty days before the House was convened; a new-made burgess had to forfeit forty pence unless he built a house within forty days; etc., etc.
The ancient physicians ascribe many strange changes to the period of forty; the alchemists looked on forty days as the charmed period when the philosopher's stone and elixir of life were to appear.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894
More on Forty from Fact Monster: