Sorkin 's hectic writing schedule often led to cost overruns and schedule slips , and he opted to leave the show after the fourth season , following increasing personal problems , including an arrest for possession of illegal drugs . Sorkin 's hectic writing schedule often led to cost overruns and schedule slips , and he opted to leave the show after the fourth season , following increasing personal problems , including an arrest for possession of `` what were believed to be hallucinogenic mushrooms . ''