Hello from JustAnswer.
The most likely causes of these symptoms would be either a hemorrhoid or an anal fissure. A hemorhoid is a dilated vein, which can occur external or internal to the anus. An external hemorrhoid would usually be readily noticeable, but an internal hemorrhoid will usually not be noticeable, but can present with pain, bleeding, swelling, and the swelling can cause leakage of feces. An anal fissure is a superficial tear in the lining of the anus, which can bleed and also get inflamed and swollen. Both of these conditions are worsened by altered bowel habits, either diarrhea or constipation, and also can be exacerbated by prolonged sitting.
There are other possible causes of these symptoms, such as inflammatory bowel disease or a vascular abnormality, but these other conditions occur far less often. A growth in the rectum or anus also can be possible, but at 38 years of age, growths would be much less likely.
Ultimately, it would require an examination to determine the exact cause. However, until you are seen, there are some interventions that you can do at home. There are a number of over the counter hemorrhoidal cream that can ease the irritation of hemorrhoids or fissures and promote healing. Although different products work better for different people, in someone that has not yet tried any products, it would be reasonable to use a hydrocortisone product. Soaking in hot water can also be soothing. It also would help to manage bowel habits. And part of managing bowel habits would be to be drinking plenty of water, and that would particularly include during air flights. If there is excessive colonic gas, then using a medicine for gas may help, such as simethicone or activate charcoal.
If I can provide any additional information, please let me know.
Please let me know if I can provide any further assistance.