Police in England say they have established the identity of a man who was found wandering around a seaside town with no memory of who he is or where he came from.