To take advantage of the best prices you will need to prove you are not a business traveller, en route to the airport, so you will need to give either yr flight details or your 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 middlesbrough station to the airport.
Going to edinburgh airport on the train is great, you can sleep, read a book (even at night), play travel scrabble, or just gaze out of the window... The other caveat to buying these cheap train tickets from middlesbrough station to edinburgh airport is that there must be at least two adults travelling together. But another great benefit is that children go free. All children under 5 go free, and then one child over five but under 16 per grown up travelling by train to edinburgh airport.
be sure to leave enough time to get to the airport early enough to eat, shop etc, so check the times of trains from the station before you go. If you end up with 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 worry about the opening times of the station.
Or maybe you meant