They could but they don't. Crew would go nuts. Even nuke subs limit
their patrols to six months max.
Longest "at sea" period I had was 41 days and that felt like years.
Channel fever gets turned up a few notches.
The typical "weather" cruise was 45 days in the middle of the ocean
but I was on a Bravo (North Atlantic) that went 53,(Absecon Nov/Dec
65).
We used to laugh at Navy guys who were in port every week or two and
called us puddle pirates,
My 41 "dayer" was shortly after reporting aboard my first ship. We
headed south, stopped at GTMO, then continued south doing hide and seek
exercises with a nuke sub for a month. When the exercise was over we
were off the coast of Brazil and about 100 miles to the equator. The CO
decided it would be a grand plan to extend the cruise by a couple of
days to cross the equator and convert a bunch of us Pollywogs into
Shellbacks. I still have my card.
Stupid, silly stuff but good memories as I look back upon them now.