Most likely a mouse or rat doing what mice and rats do but birds can get trapped inside of attics, basements and wind up inside of interior walls where they can't get out too. Sometimes other critters such as bats have been known to too.

If the 'digging/scratching' only happen at night my guess is what ever it is isn't 'trapped' there.

I believe I would start out with setting a few ordinary rodent traps around in some areas where they would likely be traveling to feed and give it a week or so.

If there is an electrical wall outlet in or near where the scratching is coming from you might could put a small mouse trap inside the wall through there and hopefully avoid having to cut a hole through your drywall.

If its a mouse or rat it may already have or preparing to have a litter. If it already has a litter inside the wall you may have to cut an access hole to remove them anyway.