I'm 40 yrs old. In the past two months I have dreamt that I am on the toilet urinating, only to wake up and realize I've wet the bed. Reasons?

Enuresis/Incontinenc. You are describing nocturnal enuresis (ne)or urinary incontinence during sleep. Ne is a condition mostly described in children ages 3 to 6 years, and is often benign and limited. In adults it is uncommon and requires further attention. Seizures are the most pressing concern. Often associated with urinary incontinence, seizures can also cause tongue biting and muscle pain. Please see your doc.
It depends. Sometimes, when your bladder is overly full, instead of awakening you, the bodily signals get incorporated into your dreams. Perhaps you are drinking too many fluids in the evening, particularly coffee or alcohol. If this happens often, see your doctor to make sure you're not making excess urine (as in diabetes) or your bladder capacity isn't less (as with large fibroids or an ovarian cyst).