Yes, it's safe but spending the night in the London City Airport is not possible due to its limited operating hours as the airport mostly shuts by 10:00 pm (1 pm on Saturdays). If you want to stay near the airport to catch an early or late night flight and don't want your sleep at stake, hotels are nearby.
London City Airport Hotel
Travelodge Hotel – London City Airport
Ibis Budget London City Airport
Travelodge London Excel Hotel
All the above-mentioned hotels are 5-minutes walking distance from the airport.