You may need to look to LEVELING as your answer.
Thermostats usually use a Mercury switch as their off-on control. If the unit does not have the jacks down, and rocks due to movement, or changing weight distribution, is can ( and will ) cause the mercury switch to react , kind of like a Teeder-Todder.
You may also wish to pull the plastic cover off the thermostat, and take an Exacto Knife , or similar item, and scrape any / all copper contacts you can find.
These tend to corrode and OXIDIZE , especially in salt-air environments, and will have intermittent reactions.
Hope this helps.
Richard