A statewide prohibition on sleeping in public spaces crossed the legislative finish lines after failing twice last year.