The airport's website says that the Tuasa bus runs until 11pm.
==========================================================
http://www.fly2sanjose.net/front/pt1.php?ref=11By Bus
The public transportation system in Costa Rica allows visitors to access most of the country. The Juan Santamaría International Airport is no exception; there is a bus stop to several destinations less than a block away from the terminal exit. There are buses every five minutes that can take you to/from the airport from/to:
• Downtown Alajuela (15-minute ride). Fare: ₡535, approximately US$0.99
• Downtown Heredia (40-minute ride). Fare: ₡515, approximately US$0.95
• Downtown San José (35-minute ride). Fare: ₡535, approximately US$0.99
If you plan on taking the bus from San José to the airport, you must inform the bus driver of your destination, so that s/he can plan on stopping at the airport bus stop and provide you with the service. Bus stations in San José are located on 2nd Avenue, north side of the Nuestra Señora de La Merced church.
Bus companies that provide service from/to San José to/from the airport are:
----------------------------------------------------
Transportes Unidos Alajuelenses, S.A. (TUASA)
Phone: (506) 2442-6900
Bus rides from 4:30 a.m. to 11:00 p.m.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Station Wagon
Phone: (506) 2441 1181
Bus rides 24 hours a day.