What you are experiencing is known as fecal incontinence, or fecal leakage.
Can result as a side effect of different conditions.
You haven't mentioned that you suffer from constipation, but, I'm sure that you are often constipated or straining for defecation.
Anal bleeding is usually symptom of hemorrhoids, and internal ones (located inside the lower rectum), may prevent complete closure of the anal sphincter (muscle at the anal opening), leading to fecal incontinence.
Painless bleeding, itching in the anal area, and fecal incontinence are symptoms of internal hemorrhoids.
Because your fecal leakage appearance depends on your activities and posture, it is very possible that your hemorrhoids or constipation, have predisposed your rectum to fall our of its place.
This is known as rectal prolapse and it is manifested with fecal incontinence.
Actually, muscles and ligaments that attaches rectum to the pelvis, due to straining and hemorrhoids have weakened, and, the rectum's attachment to the body also weakens.
In the early stages of rectal prolapse, the rectum becomes poorly attached but stays within the body most of the time, and, only the inner lining of the rectum (rectal mucosa) protrudes from the anus.
When long-term hemorrhoidal disease is the cause, the condition usually does not progress to complete prolapse.
Visit your physician as soon as possible!