worms up a tree

Hello, can anyone throw some light on this:  up at about 1.8m off the ground, in the fork of a tree, I found lots of earth worms. No earth, just the living writhing worms on the bark. ?????

only thing I can think of is that maybe a bird was on its way to its nest with a cropful of supper for the family. and for some reason got scared by something, threw up the food, and took off. ??? It doesn't sound too likely a story.

many thanks for any help in unravelling this mystery!