Of course it depends from where you are coming, but you might be able to do it in one day. Just give yourself a good connection time because the lines when arriving internationally into SJO can be extremely long sometimes, and the SANSA terminal is a short walk outside to another terminal. But if you did overnight, there's a decent Hampton Inn right by the airport (a short shuttle away).
And for me, the remoteness is the main selling point. The birds (macaws and toucans) and monkeys are frequent guests on the hotel property.