I suspect there was a precise literal basis for widow's walk, in that some widows whose widowhood was not in doubt would look to sea in mourning or remembrance.