If he's using their time / lights / heat / AC / lunch / asking coworkers / etc, to read about topics that are directly applicable to his side project, that muddies things considerably even if he's otherwise kept separation strict.
Consider taking it one step further, and bringing in your own laptop (even if you're not connected to their wifi) to work on the side project in your underutilized time. That's probably too far, but is it really any farther than reading books ?
One thing that you might find more productive than playing games on your phone that seems unequivocally "safe" in this context is meditation. An hour or two of that might help make better use of your ~5h at home in the evening.