I had this same issue last year on my mastertemp 400. Ultimately the control membrane on mine was bad as well and the Pentair tech replaced it. The membrane was a different problem altogether though, and that was not what was causing the heater to turn on by itself. I can verify this myself as I've seen the heater turn itself on even when the membrane was working.
The Pentair tech explained that the mastertemp will try to fire again if it wasn't properly shut down during the previous run. After you turn off the heater with the 'off' button on the membrane, the heater will still be in cool-down mode for a while. If the pump / water circulation is shut off before this cool-down has completed, the heater will not have fully shut off. The next time the pump is turned on, the heater will fire again after a few minutes. To prevent this, you need to keep the pump running for at least 5 minutes after shutting off the heater.
If possible, it's also a good idea to have a hard power switch for the heater installed so you can completely cut the power after turning it off. My PB had not installed such a thing, so the Pentair tech kindly put one in for me on my panel.