It's worth noting that the Vagrancy Act 1824 dealt with it, using more flowery language such as "persons wandering abroad." I've just looked at the original version in PDF and it's interesting that the preamble refers to an act passed in 1823 to last a year being re-enacted and much of it is still in force today with only quite recent amendments removing the notorious "sus laws." ie Parliament could have scrapped the lot but didn't. So while hard labour and whipping are out for idle and disorderly persons; rogues and vagabonds; and incorrigible rogues, the relevant bit of the legislation remains in force. In short it's not a new problem, although it's suggested it's becoming more common.
The Vagrancy Act 1824 ends with these words, which I have only just noticed:
... nor to alter any law now in force relating to lunatic vagrants.
I don't know what the law said about "lunatic vagrants" in George IV's day but it seems that the significance of mental illness was recognised even then. (Incidentally, it looks as though that bit was only repealed in 1989.)
I think this is a part of the underlying problem. There was a rush to demolish the Victorian asylums etc., and to replace them with the nice-sounding care in the community. How often has the word community been abused? Money was saved by closing the institutions, but the necessary funding for mental health care in the community has not been provided with the same alacrity. I'm not suggesting that sleeping rough = mental illness, but I do believe there's a connection. It's worth adding that it's said that some of the people now in prison are there more because of their inadequacy / psychiatric problems rather than any real criminality.
http://www.legislation.gov.uk/ukpga/182 ... 083_en.pdf