You haven't mentioned where you are going as there may be an option you haven't considered. As you mention "several hours" it suggests somewhere on the west coast via Glasgow - if so there's a direct bus from Edinburgh Airport to Glasgow. Do check however which Glasgow station you need to be at as there's two main ones
If a train stops at Haymarket there's no sense in going to Waverley, just take the airport bus or tram to Haymarket.
But generally 1h50m should be enough time if flights arrive on time.
BTW you pass through customs AFTER you collect your luggage, bit pointless otherwise.