Well, the way I ended up fixing my problem is, in order to wake up the router, I send a ping with a very long timeout to 8.8.8.8 which will wake up the router and get a reply
def wakeup():
subprocess.Popen(["/bin/ping", "-c2", "-w"+str(WAKETIME), PINGHOST], stdout=subprocess.PIPE).stdout.read()
And I just call this function before i do any other http requests so I don't have to bother with increasing the HTTP timeout at all.