First, based on you diagram, you need to add a ground wire from the RPi to the ground of the relay. With out a common ground, you will be strange results.
Second, from my experience, optocoupler driven relays are generally triggered with a ground or LOW input. You can verify this by testing the relay "IN" pin(s). Most likely, when you touch ground to the IN pin, the relay should turn on and then off when you remove the ground, which is exactly what happens when you perform a GPIO.cleanup command. GPIO.cleanup returns the GPIO pins to an input floating state (effectively disconnecting them).
For yours to work correctly, you'd want to use a pull up resistor on the output to keep the relay off until you trigger the RPi's GPIO output (to relay IN) with a LOW signal, which will turn the relay on.
To turn the relay off, the output should be set to HIGH. It is possible that the 3.3V HIGH state may not reach the "turn off" threshold needed for that relay since it is expecting 5V. You can just change the pin to "INPUT" to turn it off and then back to OUTPUT LOW to turn it on. If you go the INPUT route, do not use the pull up resistor.