According to a recent study, people who experience frequent bad dreams in middle age are more likely to be diagnosed with dementia later in life.