Gull dropped from tree at night

Enjoying a glass of wine in the garden late last night we heard a flapping in a sycamore tree followed by the chatter of a magpie. Next there was a thud and to our amazement a gull (Common I think) had fallen onto the concrete drive. It was clearly shocked and moving erratically but looked ok. I picked it up and put it in a large open box in an elevated position- thinking foxes. It was quiet for a while but after a few minutes it flapped it’s wing and flew off, hopefully ok. Any explanations for this? I was surprised that a gull was roosting in the tree but maybe that’s not unusual.