Is his tank heated at all? Is he bloated?
Feeding peas is somewhat common practice, although not ideal for bettas (carnivores). A better way to get things moving would be to feed him some frozen daphnia. You should be able to find it at your local fish or pet store.
Short of being able to do that, I would suggest epsom salt (magnesium sulfate). It's a natural laxative for humans, too, and it's quite therapeutic for fish. It actually has some of the minerals they need in their water on a regular basis. If you can't get daphnia, or if it doesn't work, go to your local drugstore and pick up some epsom salt (pure magnesium sulfate, no perfumes, no dyes, no additives of any kind). Scoop out some of your fish's water in a cup, dissolve half a teaspoon of epsom salt in it, and SLOWLY pour it back into his tank, in small increments if you can. This will bring his tank to a concentration of 1 tsp. per gallon. When you do water changes, make sure you maintain that concentration until your betta starts acting normal again or for 14 days, whichever comes first.