I was watching Friends S01E05. There is a piece of conversation i cannot understand very clearly - Monica Says,"Being dumped by you obviously agrees with her." Shouldn't it be "someone agree with something"? Can we say "something agrees with someone"? Thanks,
Saying something agrees with someone means that the person is improved by [doing] that thing.
In your quote the story is that prior to being dumped, the person was apparently not very happy but after being dumped the must have been a remarkable improvement in their disposition.
Likewise when something doesn’t agree with someone that thing does harm to the person. A person who says that Lima beans doesn’t agree with them may feel sick when they eat them.