The two major nationwide shared shuttle services are:
Grayline
www.graylinecostarica.com
and
Interbus
www.interbusonline.com
(I see that Interbus is revamping its site at the moment.)
Neither would operate that time of night, but if you're willing to go the next day, I think it's a great option. You need to reserve at least a day in advance. Given that that's a major tourist week, I'd reserve farther in advance than that.