It's one of those things where you just need to flex some social and observational muscles, remember your priors, and make a decision.
What can you discern about the person you're asking? What kind of trends or aggregates can you use to decide if this is the kind of person who's going to steal your stuff? Are you in a nice part of Manhattan, or are you in the Tenderloin? Lots of factors, naturally. It's the kind of thing you have to decide for yourself in the moment, but I'd hope most people intelligent enough to be reading this have the social awareness to know when it makes sense to put your trust in strangers like that.
I've done this thousands of times in cities from New York to Los Angeles, and never had a problem. It's part of modern cafe culture.
If you're worried, you take your computer with you and leave your wires and stuff behind to mark your place.
You start the program and it counts down from 10. At zero it disables sleep, and displays a warning screen stating that the computer is alarmed and should not be moved by anyone but the owner.
When the owner returns, he enters a password to end the program.
If anyone tries to move the computer in his absence, the vibration sensor triggers a screeching alarm.