This wouldn't even be a problem if I could remember that I might need to go pee while on them. The thing is that pain killers tend to make me forget everything  Try making a "pee alarm" on your phone to go off every so many hours/minutes ahead of time so you can activate it when you take the pills.  That way you get a little alarm that tells you "go pee!".  It might help a little.