As mentioned, the town of Guarulhos, where the airport is located, is well outside the city of São Paulo, but it has a number of good hotels. In that rush hour in São Paulo is notorious, I too would advise staying in Guarulhos overnight and not attempting getting back to the airport from SP in the morning.
For a 10:45 international flight, arrive no less than 2 hours ahead. The trip to the airport from Guarulhos might take 20 minutes max, whereas the trip from São Paulo during morning rush could take 2 hours.