Upvote:3
I've done this in Thailand, New Zealand, Australia, and the U.S. During the day, the main thing I look for are large-ish clump of trees and bushes off to the side away from foot traffic. I've found these at the side of roads away from buildings and sidewalks, at the far end of low-trafficked parking lots, and other misc. places. I try to avoid city parks, as you are more likely to be noticed.
Another option is to find access to a rooftop. I personally have had success at hotels and hostels as it doesn't draw attention. However, bear in mind that depending on your whereabouts, getting caught may have severe consequences.
In the years of doing this, I've been caught a few times. In my experience, even irate people respond well if you're friendly, respectful, and don't lie. I say I will leave if they want but otherwise I will be gone before sunrise without leaving a trace. I've never been asked to leave, and one time I even got promoted to a couch hidden under a hostel staircase!
Edit: found a relevant thread on Reddit.