I don't know what kind of sleeping pill he is on, but Ambien had some research published some time ago that shows it INCREASES risk of sleepwalking. I don't know if you've tried TOT Locks, but they're the only ones that childproof our cabinets (put all the keys in your pillow, and have no other magnets in the house). They also sell cheap ($20) 'alarms' at home depot that will wake the house if a door or window is opened. You could try them on the door and window leading out of his room - to let you get some sleep.
If none of that works, I know a lot of people would consider it extremely inhumane, but I'd cocoon him (think light tight sleeping bag with a locked zipper) before I'd let him hurt himself.
Here's a list of other possible roots of sleepwalking: http://www.emedicine.com/neuro/topic638.htm - it seems to me that, barring other causes, a paralytic would be more effective at stopping it than a sleeping pill. You might try a sleep disorders specialist (I have no referrals) - I'm assuming his doctor ordered a sleep study, though - where they do an EKG while they sleep to study brain function and rule out seizures, etc.
S.