An inverter has 4 pins. PWR, GND, IN, and OUT. Simply put, it takes a signal and reverses it. So If you had voltage IN, it would show ground on its OUT.
If you used a or I think you could forget the inverter, and use a P-Channel Mosfet.
So something like this maybe.....
This, of course, is if your sensors OUT sinks to ground. What happens is the +5V will supply the P-Channel mosFET with power, making no current flow through the mosFET. Once the sensor is activated, it sinks that +5volts to ground through the sensor, and the mosFET will then see a ground and allow current to flow through it.
Does that make sense to you?