I've done a fair amount of electrical troubleshooting, and this would have me concerned. In the few times I have dealt with this, it was a loose, or burned connection. The connection develops a high resistance, due being loose on a terminal screw, or being damaged by that damn "push wiring" that nedwin refers to. The circuit opens up until the connection cools, then the current path is reestablished. I have pulled receptacles out of the wall and found that the combination of a heavy load, like a hair dryer, or toaster, and the use of the push wire terminals on the back of the receptacle, has lead to the "hot" wire being literally cut in half by the spring clip making the connection, inside the device.
The key to troubleshooting, as mentioned by BudgetSlasher, is to do a survey to determine what exactly is on the circuit. If you wait until the next failure, find out where the circuit is dead, and still hot. This will give you an idea of where to pull switches and outlets to find the weak spot. Now this could be all useless information if the problem is something you recently reworked, and somehow created this entertaining mess, but I doubt it.
Finally, there is a slight chance that the breaker could be failing and creating the situation you describe. I just did a water heater swap for my little brother. I got the job done, flipped the breaker back on, and drove away. This, oddly enough, has worked pretty darn well for the other dozen, or so, water heaters I've gotten roped in to doing for friend and relatives, for free, LOL. He called a bit later to report that there was no hot water. I agreed to return the next morning. He then texted to report that the breaker cured itself, and hot water was flowing. I stopped the next day and put a new breaker in. It was a five minute job and the breaker was less than $10. In your case, unless it's a really oddball electrical panel, the breaker should be less than five bucks and take five minutes to swap, so I would do that first, just so you are not diving down the rabbit hole, to fix a problem that doesn't exist.
Good luck, and be safe.