I think it came from seeing large groups of sparrows going back and forth in the autumn sky.
Lyrics
A bagatelle of blackbirds gathers in the sky
Bringing good or evil any way they fly
Blessings from the oak tree curses from the ash
Rays of healing sunlight or raging thunder crash
Shadows on the hillside covering the farm
A bagatelle of blackbirds keeping out of harm
Scatter bread and seed the birds will bring you luck
Carrots for the bunny and crackers for the duck
And when a cloud of blackbirds flies across your door
Put your home in order go astray no more
Holly in the window and sage upon the fire
Melody on lute and harmony on lyre
A bagatelle of blackbirds flying through the corn
Waiting for the dawn on a Derry summer morn
Rooftop to weather vane bringing good or ill
Famine to the countryside or gold upon your sill
Wintertime approaches and crimson leaves appear
Gather up your firewood put corn out for the deer
And when a group of blackbirds circles overhead
Put candles in the window and flax upon your bed
Blackbirds flying two by two
Good fortune they will bring to you
Blackbirds flying four by four
Place mistletoe upon your door
Blackbirds flying eight by eight
Bursting clouds and changing fate
Blackbirds flying ten by ten
Peace on earth
Good will to men