As a general rule of thumb: Praying to any given god increases favor for that god, increases favor for the gods just above and below alignment wise a little less, increases favor for the gods one past that a lot less, does nothing for the gods one past THAT, and knocks your favor with all the rest. For example:
I pray to Loricatus (N=). I gain, say, 10 favor with him (these numbers are coming straight out of my ass, btw). I also gain 6 favor with Silva (N+) and Mellis (N-), and 3 favor with Sophos (L-) and Cleptia (C+). Nothing happens to my favor with Seges, Dulcis (both L), Nefas, or Scabies (both C). I lose favor with all the rest of the gods.
Now I may be wrong on the range here; praying to a god may only increase for one alignment range, do nothing, for two, and cost you for the rest. But I think that's about right. I know it's reasonably viable to pray to up to a 5 alignment range worth of gods, as long as you do them all at the same time and are careful not to anger any of them.
That's another thing, this is all assuming your prayer doesn't result in an anger effect. I have no idea how that would influence favor.
"Put more stuff in the... thing where... more stuff goes in."