I actually had a similar thing happen a while back!!
My juvenile corn was hanging out with me and worked his way into the mechanics of my computer chair, jus far enough that I wasn't able to pull him out. He was probably only 3 inches in or so, but was able to find something to hold onto and I wasn't risking pulling him. So I just let him do his thing, hoping he would come out. Nope! I tried to lure him out with food. No dice! After pulling the legs off the chair I wrapped it in bedsheets in case he came out over night. Still nothing! I ended up VERY carefully and meticulously pulling the chair apart and destroying the chair. Once I was able to get to the snake, he just looked at me as if to say "what!? I was comfortable and just chilling. Can you put the chair back together please?"
Luckily it worked out for the snake, the chair however ended up destroyed in dozens of pieces.