This has been posted about frequently, so a search of this site will yield a wealth of ideas. In the meantime:
1) Is your pouchitis being treated? That’s the most important thing.
2) A bowel slower (Imodium or Lomotil) at bedtime can be very helpful, especially if it’s not used during the day.
3) Stop eating a few hours (or more) before bedtime.
4) A very small fatty meal (like a spoonful of peanut butter) at bedtime helps some people a lot.
5) Soluble fiber at dinner time (e.g. psyllium) can thicken things up and for some people reduce leakage and accidents.
6) If you’re using a sleep aid you might be more likely to miss the signals that your pouch is getting busy.
Good luck!