That's grand! Depending on what time you arrive in Istanbul, either take a flight to Izmir on the same day from the same airport (allowing plenty of time between flights in case of delay to your first - maybe with the same airline?) OR stay overnight in Istanbul and, if the flight is cheaper by more than 10-12 euros, take a shuttle to Sabiha Gokcen airport to fly to Istanbul by Pegasus or a budget similar airline, storing most of your luggage at your Istanbul hostel to await your return.
From Izmir airport there's a direct rail link to the centre of Selcuk. 2-3 days there, at your own pace, will be a lovely way to get over your jet-lag. Ephesus is a 3 km (<2 mile) walk away, much of it down a road lined with mulberry trees. (If you see the fruit lying on the grass, do taste some - it's lovely!) .... OR you can take a local bus and save your legs for the site. ...... As well as Ephesus, you can visit the Virgin Mary's house, on top of a mountain. Sadly, no public transport - it's taxi all the way, but they wait for you and bring you back down to the top gate of Ephesus, which is the best way to enter the site. In the town there's a really great museum, with many artefacts from Ephesus and around.
If you do have the energy and want to venture further there are organised trips to three sites, one of which includes a beach - and time to swim. or you can take a bus there by yourself. Kusadasi, over the hill and on the coast, is a small city which is quite pleasant - again, regular buses.
Normally I'd suggest an overnight bus or a daytine bus+ferry back to Istanbul, but you're doing quite enough travelling, so just take a flight from Izmir airport, going there by train same as you arrived. Here is the train timetable - http://seat61.com/Turkey2.htm#Izmir_Ephesus_Pamukkale
WHY am I 'pushing' Selcuk? It's because it's a lovely, peaceful town with lovely people who mostly speak English. It's also a lot cheaper than Istanbul so you won't feel you're wasting money if you're not up to much sightseeing - though there's enough to see if you are. Apart from morning crowds at Ephesus when there's a cruise ship in, there's a really relaxed, laid-back feel to the place. And the food is lovely, too.
