To take advantage of these prices you will need to prove you are a leisure traveller, on the way to the airport, so you will need to give either your flight numbers or yr holiday booking reference. I don't think you will need to provide this when you arrive at the station but you may be asked to provide them on your journey from the station to edinburgh airport.
Going to edinburgh airport on the train is great, you can sleep, read a book (even at night), play travel scrabble, or just stare out of the window... The other restriction to buying these cheap tickets from the station to edinburgh airport is that there must be at least two adults travelling together. But another great benefit is that kids go free. All children under 5 go free, and then one kidover five but under sixteen per adult travelling by train to the airport.
be sure to leave plenty of time to get to the airport early enough to eat, shop and so on, so check the times of trains from the station before you go. If you have spare time at edinburgh airport you can always read a book or play travel scrabble again! As you have bought your train ticket in advance, you don't need to fret about the opening times of middlesbrough station.
Or maybe you meant