Several factors can contribute to ear discomfort in dogs, particularly after a good night's sleep. There might be a buildup of excess moisture or wax inside the ears due to sweating during the night. Additionally, dust mites or allergens present in bedding could trigger a mild allergic reaction and irritate the ears.