Sometimes, and the deciding factors are less about the games themselves than about sleep, time management and what gets displaced.
Games that reward planning, reading and problem-solving can reinforce useful habits, and a short session is an effective way to decompress between study blocks. Plenty of students find that a deliberate break makes the next hour of revision more productive.
The damage almost always comes from overrun sessions late at night. Sleep loss is the mechanism that shows up in grades, not the content on screen. Games are also engineered to make "one more match" feel non-negotiable, which is where careful students lose control of an evening.
Fixed windows, a hard stop before bed, and treating play as something you finish work to reach rather than something you fall into, keeps the effect neutral or positive.