So the problem never went away?
Leaving the computer off for some time should have no bearing on this problem. After a computer has cooled down, it does not get cooler if not used longer so heat is not an issue there. Dust only matters when it accumulates enough to form a heat-trapping blanket, or when it interferes with proper fan rotation or air flow.
How old is this computer? If more than 3 years, you might consider replacing the BIOS battery. To do this, you unplug the computer from the wall, touch bare metal of the case interior to discharge any static in your body, then, after noting the polarity, remove the battery. Replacements can be found at most any camera/watch/battery counter. Most likely, it is a CR2032 wafer (coin-type) battery. Take the old battery with you as most counters will recycle the old. These batteries are typically just a couple dollars so if not the problem, little is lost.
Do not touch the new battery with your bare fingers. Skin oils promote corrosion and attract dust. I put a clean sock over my hand. Then replace the battery, again noting the polarity. Reconnect power and immediate boot into the BIOS Setup Menu and reset the date and time, and verify your RAM and drives are properly identified. Then Save and Exit to boot normally and hopefully, that will resolve your problem.