Usually they do that to start the shedding process. They rub their nose on something to get the skin to start coming off. I've never had a snake that would rub it's nose on surfaces for any reason other than that though, so he may just be stressed from all the baths and such.