The Magic Castle was one of the most memorable evenings we had on our trip a few years ago. If you don't want to stay at the Magic Castle Hotel, I believe the Hollywood Celebrity offers the same opportunity to go to the Magic Castle and their room rates are much cheaper.
When we went, we actually had an opportunity to talk with the owner. He said that if we wanted to come back, to call the Magic Castle (or e-mail them) and tell them you are interested in perhaps becoming a member, and they can arrange for you to get guest passes.
As far as how far ahead you need to book, I don't think it's much of a problem on weekdays, but weekends might be a little trickier.