"Take the piss" may be a reference to a related (and dated) idiomatic expression, "piss-proud", which is a vulgar pun referring to the morning erections which happen when a man awakens at the end of a dream cycle (each about 90 minutes in length throughout the night) or may be caused by a full bladder pressing upon nerves that help effect erection. This could be considered a "false" erection, as its origin is physiological, not psychosexual, so in a metaphoric sense, then, someone who is "piss-proud" would suffer from false pride, and "taking the piss out of them" refers to deflating this false pride, through disparagement or mockery. As knowledge of the expression's metaphoric origin became lost on users, "taking the piss out of" came to be synonymous with disparagement or mockery itself, with less regard to the pride of the subject.