US Customs operating hours at YVR are from 4:30am to 8:30pm. If your flight departs at 6am, best you arrive at 4:30am, but I am only speaking from personal experience as it was complete chaos last time with everyone there waiting for them to be open.