Why do the wing tips on the Boeing 777X fold up instead of down?
The FAA has decided/proposed (Nov 2017) that the folding mechanism must comply with certain standards, of which:

The wingtips must have means to safeguard against unlocking from the extended, flight-deployed position in flight, as a result of failures, including the failure of any single structural element.
All sources of airplane power that could initiate unlocking of the wingtips must be automatically isolated from the wingtip-fold operating system (including the latching and locking system) prior to flight, and it must not be possible to restore power to the system during flight.
The wingtip latching and locking mechanisms must be designed so that, under all airplane flight-load conditions, no force or torque can unlatch or unlock the mechanisms. The latching system must include a means to secure the latches in the latched position, independent of the locking system.
It must not be possible to position the lock in the locked position if the latches and the latching mechanisms are not in the latched position, and it must not be possible to unlatch the latches with the locks in the locked position.

Source: federalregister.gov (broke it down into paragraphs for easy reading)
As to why they chose up and not down, only the responsible engineering team at Boeing can answer that. My guess is that they trust their design over the drivers around the plane when it's parked.
This is echoed by airinsight.com:

(...) Boeing could point out that the upward folding wing offers considerably less opportunity for &quot;ramp rash&quot;.  It is, unfortunately, true that vehicle drivers around aircraft are often clumsy and hit aircraft.


Interestingly, the folding wingtip was envisioned 28 years ago for the 767-X (what eventually became the 777):

(flightglobal.com)