This recorrent thought about an iminent explosion because of a gas leaking is a symptom of an Obsessive-Compulsive Disorder (OCD). The Obsessive-Compulsive Disorder is one of the five major types of anxiety disorders, the others are Generalized Anxiety Disorder, Panic Disorder, Post-Traumatic Stress Disorder and Social Phobia.
The OCD is characterized by recurrent unwanted thoughts, in other words, obsessions, which causes the person to have repetitive behaviors such as checking whether the stove has been turned off or not over and over again. This repetitive behavior is done in a false hope of making the obsession dissapear, that is, Martha checks the stove hoping this compulsion will dissapear after she sees that there is no gas leaking. However, that relief is temporary and she ends up repeating the behavior indefinetely.