I have seen so many different ages quoted for the start of dreaming that I have given up on determining when it actually starts. For example in Parenting sleep expert Jodi Mindell says that newborns may actually be dreaming in REM sleep, though only in images and not in words, but nightmares probably don't begin until 2 or 3. Again researchers are reported according to this pediatrician to have shown that newborns dream but nightmares don't begin until around 3. According to Scientific American some scientists believe that while REM sleep occurs in newborns dreams don't happen until much later.
There are many factors which can cause poor sleep around five months of age. While the majority of babies will probably not get teeth until a couple months later some babies genuinely are teething at this age and during the week or so around cutting teeth may experience difficulty sleeping. A pediatrician I know pointed me to this recent study which showed that the correlation between tooth erruption and the symptoms parents most commonly consider to be teething symptoms is statistically significant.
Another factor is the experience of a mental developmental leap in the weeks leading up to the six month birthday. Wonder Week 26 is the name given to this leap by the researchers who describe it. During this leap your child begins to understand distances and separation, including the fact that you are distant from your child and the fact that your child is actually quite a small infant. This can be very alarming information to someone who has not understood it before and can cause restless sleep as your child processes it. This leap forms the roots for separation anxiety which may plague your child anytime between now and 18 months.
Another cause of wake-ups may be an inappropriate nap schedule. Children at this age should be on two or three naps. A child on two naps will have around 3 hours between sleep periods. A child on 3 will have up to 2 1/2 at this age. Your child should have a maximum of 9 hours total awake during 24 hours at this age according to this chart. If your child has just dropped his or her 3rd nap or is showing signs (such as extended play before naps or very short naps of 30-45 minutes each) of needing to drop a nap then the total daytime awake time will be lower during the nap transition. If your child is having sleep disruptions but not ready to drop to 2 naps you may need to do a little nap limiting so your child can still fit in 3 naps. A common 3 nap schedule is 1.75-2 hours from morning wake up to first nap, 2-2.25 between nap #1 and nap #2, 2.25-2.5 hours between nap #2 and nap #3, 2.25-2.5 between nap #2 and bed. Once it takes 2.5 hours or more for your child to reach his or her first nap then it is time to consider switching to 2 naps.
Between four and six months of age your child may begin to exhibit the signs of readiness for solid foods. You may want to discuss with your pediatrician whether or not it is time to start your child on solid foods. Though rice cereal and other grains have been shown to have no effect on infant sleep, some mothers theorize that filling solids containing fats and proteins do help children not be hungry at night. Note that this theory is entirely based on parental experience and I have absolutely no studies to back it up.
The important thing about these wake-ups may be less what causes them and more your reaction to them. Your reaction will depend very much on your nighttime parenting philosophy. Attachment parents believe that your constant soothing of an upset child is required for emotional health and will usually respond by bedsharing, night feeding, and other soothing tactics. These parents trust research which says that very hands-on parenting leads to more emotionally stable individuals later in life.
Parents who follow the Weissbluth Method, the Ferber method, sleep help fading, or other sleep training methods have a different philosophy. They have read the studies on the importance of age-appropriate sleep amounts and sleep consolidation and seek to promote sleep for the whole family. It is important for these families to continue to use a variant of their chosen method to encourage independent sleep during sleep disruptions. If a family has sleep trained their child using the Ferber method and then begins bedsharing or nursing back to sleep during a disruption it sends a conflicting message to the child - sometimes if the child cries he or she will be helped to sleep and sometimes not. This creates an inconsistently reinforced habit of night waking. Inconsistent reinforcement of a habit creates the strongest habit! So if you already have a method you have used to get your child sleeping through the night, do not change it due to these wakings.
If you have just been rolling with your child's good sleep up until this point, now is the time when you need to decide how to handle night wakings. Do you want to comfort to sleep at this age and up until a later age? Do you want to implement some form of sleep training? Do you want to wait ten minutes to see if your child can settle, then do a check for diaper changes and hunger, then sit in the room until your child falls asleep? Figure out what is sustainable for your family and what your doctor recommends and do that.