That depends on the severity of your back pain. Rolling about on the floor with a small child is a great way to lose stress and tension. If the pain comes from spasms or tension, and is purely muscular, then the muscles can be loosened with gentle pressure from the baby's weight. For example, allowing the baby to sit on your back while the parent is in the child pose as shown in the first video.
As long as playing baby yoga doesn't hurt, but feels good while you are doing it, it can be very beneficial for a bad back.
Of course, the ultimate solution for a chronic bad back is the regular use of a gravity inversion table as explained in this article: