The length of time that you can survive in the ocean without a life jacket depends on how well you can swim and how good you can keep yourself afloat in the water along with the ocean waters temperature.
In 50 to 60 F degree ocean water you can often survive for 1 to 6 hours in the ocean without a life jacket if you're a pretty good swimmer although unconsciousness and exhaustion can set in within 1 to 2 hours.
In 60 to 70 F degree ocean water you can often survive for 2 to 4 hours in the ocean without a life jacket and within 2 to 7 hours exhaustion or unconsciousness can set in.
In 70 to 80 F degree ocean water you can often survive for 3 hours to an indefinite amount of time but exhaustion or unconsciousness may set in within 2 hours to 12 hours.
Although it will depend on the individual and there health and the water temperature and the persons ability to swim, someone can often stay afloat in the ocean for a variable amount of time, depending on factors like water temperature, sea conditions, and whether or not they are wearing a life jacket or using other flotation aids.
In most cases though a healthy person can float for a few hours or even a day or two in relatively calm, warm water.
But, in colder water, a persons survival time can be significantly shorter, potentially as little as 15 minutes in arctic waters.
Using clothing or other objects as makeshift flotation devices can extend survival time in the ocean water or other water.
It's very important to wear a life jacket when out on a boat to help you stay afloat because even if you can swim you can still become tired from swimming.