Hi Haaris, you can perhaps close off the back half facing your dining space with a thin hardboard, similar to the one you would put on the back of a dresser/drawer from IKEA, and paint it the same colour of the sofa table. This would hide the cables underneath the sofa table and have a polished look for the visible back portion. Alternatively, you can try reducing the length to fit just the wall. This just means that anyone sitting on the end of the sofa on the dining space side will have to reach further to access the cables.