I would say yes, in most cases an outdoor bench with armrests does discourage people from lying down on a busy sidewalk, but it is not a perfect guarantee. The main reason is simple: armrests divide a long, flat surface into smaller sections. A typical adult cannot stretch out comfortably across those divided sections, and the raised bars make it awkward to rest your head or hips without pressing into metal. On a busy sidewalk, that extra discomfort is usually enough to make someone choose not to use the bench as a bed.
That said, discourage is the key word. A determined person can still curl up between two armrests, especially if the sections are wide. Some people may sit sideways or lean over a center armrest for a short nap. Children or smaller adults might fit more easily than a taller person. So while armrests reduce the likelihood of lying down, they do not eliminate it completely.
There is also a design and policy angle. Many cities use benches with center armrests or multiple dividers as a subtle way to manage public space. It looks like a comfort feature, but it also works as passive crowd control. That is why you will see this style near transit stops, storefronts, and busy pedestrian corridors. If the goal is to keep the bench available for sitting and to prevent long-term sleeping, armrests are one of the cheapest and most effective tools.
The trade-off is that this kind of design can be controversial. Critics call it hostile architecture because it removes a resting option for homeless people without providing better alternatives. Supporters say it keeps public seating usable for everyone and reduces conflicts on crowded sidewalks. From a purely practical standpoint, though, the answer is clear: yes, an outdoor bench with armrests will generally discourage people from lying down, especially in a high-traffic area where comfort and space already matter.