When trying to identify what a UFO may be, airplanes and helicopters are a couple of the considerations. Other things such as balloons, Chinese lanterns, and flares are some other common considerations. Model aircraft could be culprits too. The quadcopters flying in formation in the video below may also be able to fool someone into thinking they are seeing some kind of unknown aircraft.
I'm not sure, but I'm guessing these were programmed to fly in the formation they were in. These also made me think of some of the "triangle" UFO sightings people see where three lights seem to form a triangle. I'm not necessarily saying these could explain away every triangle UFO sighting, but I could see how these could fool someone into thinking they are seeing a UFO.
If you want to see a video where it isn't dark, the video below shows some nano quadcopters flying in programmed formations.