If the power cord plugging into your trainer is loose and/or the trainer seems to lose connection or power down as a result, the pin in the center of the port on the trainer likely needs to be adjusted.
The pin in the center of the power port is split down the center, with a 1.5mm gap between the two halves. With normal use and getting plugged in and unplugged frequently, the two halves of the pin will get squeezed together, making for a loose connection inside of the plug.
If the two halves are visibly pinched together or you can see no gap between the sides, it's advisable to use a small, flat edge to spread them apart 1-2mm. This will in turn grip the inside of the plug more effectively, and cause a tighter and more consistent grip to hold the power plug into the port on the trainer.