On the inbound to Singapore you can use the transit hotel for six or eight hours, be sure you have a reservation. By the time you get up in the morning the MRT will be running and you can get in to town for S1.5 or so.
Outbound not much option as there is no way to get airside with a UA ticket until 4:30am. If your hostel has a 24 hour front desk have them call you a cab at about 4:30am.