(uno, relays etc being powered from separate 5v psu) then one of the relay randomly turns on and stays on untill i reconnect the computer then it turns off again
So you have a system where some parts are powered up and other parts are not.
That is not the way to design electronics and a sure fire way to get things to misbehave, unless you design it correctly.
Tell us what you have and then maybe we can correct your design.