Yes, they can — in both directions.
Frustration is the obvious route: a difficult boss, a dropped connection or a teammate griefing you will shorten almost anyone's fuse, and the effect often outlasts the session. What is less discussed is that the same games can improve mood and patience, which is why people use them to unwind after a bad day.
The variable is usually not the game but the player's state and how long they have been at it. Taking a break when a session stops being fun does more for your temper than changing what you play.