The most fitting answer to why the sailor views the sea as "dead grey walls" on which is written the "grim hatred of nature" in Stephen Crane's "To the Maiden" is:
The sailor's negative experiences with the sea have led him to develop this perspective.
This option reflects how his past experiences and encounters with the sea shape his perception, leading him to see it in a bleak and hostile manner.