Car won't restart. Have to wait 30 minutes

Thanks for replying,car/is a 4 cylinder 5 speed manual 99 cougar/90k/well maintained/been in the family about 5 years.Car turns over but will not start(like a bad fuel pump).Usually happens after its been running a while, and then a quick stop somewhere.Just when you think its hopeless(about 30 minutes)it starts up and runs fine…thanks for your time…Bill