I honestly don't know what to do...

Sam
My girlfriend and I don't have sex very often due to the fact that i have a very low sex drive. Every few days i try to schedule a time where i go into the bathroom when she's sleeping or she'll sleep in the living room where its colder and i'll masturbate when she's sleeping.
Ten minutes ago she went into the living room to take a nap and so i closed and locked the door so i could masturbate and i was alone for about five minutes and i thought i heard her try to open the door so i stop and listen if she said something but i don't hear anything so i go back to masturbating and then i hear her say, "babe, open the door.." so i open the door and now she thinks im mad at her for stopping my 'alone time'.
Basically this is the first time she's caught me masturbating by myself and now she's upset because she gets insecure about if she's good enough for me and if i even want her. I love her to death and i would never intentionally hurt her... I just tend to unintentionally hurt her all the time and I just don't know what to do anymore...