All you need is voltage across (and current through) the coil. I'm guessing you have a relay board with a driver circuit? In that case, yes, just apply 5V to the "in" pin. (Plus, you need a ground connection.)
The input of the relay module is meant to get 0 or 3.3volt or 5volt (from an Arduino pin),so connecting the input to 5volt or ground is ok.Leo..