Overnight buses in Turkey run when the distance between the origin and destination is enough to allow a departure before midnight and an arrival after six in the morning. However, you don't get many six-hour routes that operate overnight.
When a city is not the origin or destination, it is possible to find buses that pass through so that you get an overnight trip.
Göreme is too close to Ankara for overnight service, and since Ankara and Göreme (actually Nevşehir) are major destinations, they are most often terminus cities and don't get as much through traffic. You'll probably have to take a day bus.