I, err, know exactly what you mean. 
Talk to your doc about it for sure.
I'm a STM and from my experience it is from straining too hard/constipation. Take some colace (ask doc first) and drink loads and loads of water and eat a lot of raw veggies and fruit. This is also a good idea once you've had the baby. Need to keep things moving and loose!
Also, try and stay active. Helps with more regular BMs.