Over the last year, workers at large technology companies have staged protests over military contracting, sexual harassment, and the treatment of temporary and contract workers. On May 1, activists at Google and Facebook Inc. turned their attention to what they describe as retaliation against those involved in such activism.

People walk in Google’s main campus as a sit-in takes place within Google’s main cafeteria in Mountain View, Calif. on May 1.
Photographer: Amy Osborne/AFP via Getty Images

At over a dozen offices of Alphabet Inc.’s Google, workers staged sit-ins, with the largest protests drawing hundreds of workers, according to people who attended. Employees told personal stories about...