I am sorry to hear he isn't feeling well. Perianal pain post operatively - I am assuming there were no episodes prior to surgery?
One possibility... There are typically sutures placed underneath the skin. They are absorbable and may take months to degrade. Mild inflammation is usually present. The inflammation is needed to dissolve the sutures and is almost always done without the patient ever feeling it. However even mild inflammation next to a really, really, really sensitive area may present with some clinical discomfort. For the most part patient after anal sac removal surgery will be without any problems, but he may be extra-sensitive.
A few questions: How often do the episodes occur? Are they less frequent? Getting worse? Bowel movements normal?
What can be done? Depends on how bad the episodes are. If they are improving and becoming less frequent, some warm compressing and time can do the trick. If the signs are often, causing a lot of pain, getting worse; perhaps some medication may be necessary. If the surgical site looks clinically find and without inflammation, then gabapentin may be helpful. This medication is useful for pain associated with nerve stimulation (such as phantom pain syndrome, etc...) If the nerves are being stimulated by low grade suture degradation, this medication may help. There are several options for pain medication. Sometime stool softeners can also be of benefit. You may want to ask your vet what she or he recommends. If additional symptoms are seen, it would be important to let your vet know in case there is something else going on...
Hope this helps.