Open your Activity Monitor in Utilities folder
Observe the System Memory (bottom bar choice) & Sort the CPU by ascending.
When your machine slows you may be able to identify which application is acting up. You might also see that your RAM is exhausted due to a known bug causing a memory leak.
If RAM is exhausting, a restart will clear it or run Disk Utility. A side effect DU is to clear portions of the Inactive RAM. Usually that occurs within the first few seconds or moments.
More RAM will help delay the issue but is not a total solution.
A commercial utility called iFreememory may also help clear RAM.
Free, however, is the Terminal command "Purge". It requires Xcode Developer tools installed on your machine. Xcode comes with your Mac on the installation disk. Open Utility>Terminal and type "purge" and return key.
Again, it helps but does not fix the underlying problem.