I don't know about YYZ, but YUL offers free wifi and during the night shouldnt have any problem with speed as most of the airport will be empty, plus there is both Tim Hortons and Subway (ok I agree not the greatest choices) open 24h so you can grab something to eat or drink should you want to.
As mentionned previously, the Marriott right above the US departure area is really nice hotel, or close by there is the Sheraton or Aloft (both with free shuttle) which might be a bit cheaper should you want other options.