After seeing the riki dart + mirana arrow combo where you can bkb before being stunned by the arrow, I decided to try most other stuns to see how they interact with sleep and BKB.
I'm even more confused now.
Can BKB from sleep, still take damage and get stunned
Sven Storm Hammer
Snapfire Cookie
Wraith King Wraithfire Blast
Kunkka Ghost Ship
Beastmaster Primal Roar
Earth Spirit Rolling Boulder
Marci Rebound
Pudge Hook
Dragon Knight Dragon Tail
Clockwerk Battery Assault
Luna Lucent Beam
Bounty Hunter Shuriken Toss
Shadow Fiend Requiem
Sniper Assassinate with Aghs
Dazzle Poison Touch with Shard
Enigma Malefice
Ogre Magi Fireblast + Unrefined Fireblast
Techies Blast Off! with Shard
Void Spirit Aether Remnant
Can BKB from sleep, still take damage but don't get stunned
Mirana Arrow
Mars Spear (still get pushed, but don't get pinned, so it should probably be in previous category)
Elder Titan Echo Stomp
Medusa Mystic Snake with Aghs
Can't BKB from sleep
Vengeful Spirit Magic Missile
Magnus RP
Kunkka Torrent
Primal Beast Pulverize
Tusk Snowball
Tidehunter Ravage
Tidehunter Tendrils of the Deep (shard)
Spirit Breaker Charge
Spirit Breaker Nether Strike
Anti-Mage Mana Void
Pudge Dismember
Sand King Burrowstrike
Slardar Slithereen Crush
Brewmaster Earth Brewling Hurl Boulder
Clockwerk Hookshot
Chaos Knight Chaos Bolt
Centaur Warrunner Stomp
Earthshaker Fissure
Earthshaker Aftershock
Hoodwink Bushwhack
Gyrocopter Homing Missile
Monkey King Boundless Strike
Nyx Assassin Impale
Pangolier Roll
Batrider Flaming Lasso
Jakiro Ice Path
Enigma Black Hole
Leshrac Split Earth
Lina Light Strike Array
Lion Earth Spike
Shadow Shaman Shackles
Witch Doctor Paralyzing Cask
Visage Familiar Stone Form
Any stun that doesn't do damage
Any hex
Any bash
Source: https://www.reddit.com/r/DotA2/comments/11b6pb1/i_tested_most_stuns_to_find_out_which_you_can_bkb/