Causes of Stomatitis: Canker Sores and Cold Sores Canker Sores Nobody knows what exactly causes canker sores, but many things may contribute to their development, such as certain medications, trauma to the mouth, poor nutrition, stress, bacteria or viruses, lack of sleep, sudden weight loss, and certain foods such as potatoes, citrus fruits, coffee, chocolate, cheese, and nuts.