Anal Problem

So me and my boyfriend wanted to try something new and decided to do anal. We did it and it wasn’t so bad. But afterwards I went to the restroom and went to sleep then woke up to take a shower. I had to go poop and when I did my asshole was hurting but I still pooped. I want to know how long it’s gon take for the pain to go away?