Which is correct grammar in the following sentences, the use of "nearer" or "nearer to"?

She swam nearer to the surface.
She swam nearer the surface.

Or are both sentences correct? I'm second guessing myself and I'm no longer sure which is proper grammar.

Thanks!