If npo, how can they give me enough sedative during my endoscopy?

Iv. Sedative are given intravenously.
It will. be mostly intravenous but even if NPO you can still take medication with a sip of water before the procedure or surgery.