Many departures from the airport take place very early in the morning, as well as arrivals in the late evening. There is currently no accommodation on the airport premises, but you can easily spend the night in the terminal, which is open 24 hours a day and you won't be turned away.
The nearest well rated hotel, the Advenus, is about 1,200 metres / 20 minutes walk away. There is no trolleybus line to it and you have to walk along a dimly lit path which can be muddy in the rain.
Otherwise, look for accommodation in central Lviv, which can only be reached by taxi during the night.