CRS are the best for dealing with this. In the meantime, read up on some of the information we have about Anal Fissures on here. It is very common, but just does usually hurt like hell for most people.
What happens is that the internal anal sphincter (the one that we can't control) tenses up like having a cramp in your calf that you wake up with, except often quite a lot worse with the pain, which can go on for hours. Some great posts on here have been written Davo, one of our moderators who does not come in any more but is getting on with life again! I will put a link to his posts. Reading them will give you an idea of how this all progresses and some ideas of what to do.
We are here to help, answer questions, and listen!
Here is the link to Davo's posts:
member/Davo/topics/?sf=firstpost