I woke up during an endoscopy when I was young (4/5 years). I have a pretty vivid memory of that one single moment when I came too, and the doctors/nurses panicking a bit when they realized I was conscious. It ended pretty quickly when they gave me more of whatever the anesthesia was.