Amana Electric Dryer runs for a while.

My Amana Dryer runs for a while and then stops and has difficulty starting again. I let it sit overnight and it started right up and has been running fine. Any ideas what could be wrong?