Great question — answering as the UphillTech team:
Get the 4am Southern train service from London Victoria, gets you into Gatwick at 4.46am There's also a 4.30am Gatwick Express that'll get you in at just gone 5am, but tickets are bit more on that. See http://traintimes.org.uk/london+victoria/gatwick/04:00/tuesday for examples for tomorrow (well, that URL will always work for the coming Tuesday, but the site has a search!) (There's also the option to stay in Brighton, and get the 3.50am train to Gatwick, but you'll probably find London both easier to get to and cheaper to stay in, even if it lacks a beach!)
Full answer by Gagravarr: https://travel.stackexchange.com/a/500 (CC BY-SA 4.0).
Need it done for your business? UphillTech.