I was wondering, if medications such as antibiotics are to be taken 4 times or more a day (so every 6 hours), what happens during the night with such a long gap in between (8 hours). I have heard that the impact of medication lessens if the dosage is delayed, so how come sleep through the night without medication is okay?
There are very few (but there are some) medications that need to be taken at very strict time intervals; early drugs for AIDS needed to be taken even in the middle of the night.
No one expects four times a day to mean, literally, every 6 hours on the minute. The dose is calculated to cover that period of rest (sleep).
To understand this, you need to understand steady state pharmacokinetics and pharmacodynamics.
After a certain number of doses, a drug builds up in the body to a steady state - meaning it stays more or less in the same concentration in the blood between doses, or to put it another way, the amount being taken in and the amount being eliminated by the body are about equal.
It's not guesswork; researchers study the drug before it's even released to determine such things (see the second reference.) Pharmacokinetic studies determine the dosages at which the concentration of a particular drug/antibiotic is always high enough between doses such that serum levels don't fall below effective levels.
Say a drug under investigation is given every 12 hours. Blood is drawn at frequent intervals over a number of doses for to determine peak levels (the time at which the concentration in the blood is highest) and trough levels (the time when the drug is the lowest.) If at the trough level the drug is below that needed to be effective, the dosing interval decreases: the subject must take it more frequently, say every 8 hours. This cycle continues until the ideal dosage and dose interval is established. The final recommendation takes into account how long you can go without taking the drug and still have enough drug - how to take the drug such that the steady state is maintained - if you sleep.
If a drug falls below the effective dose quickly (say it is metabolized into an ineffective product), and a satisfactory prolonged serum level can't be arrived at, the prescribing physician will alert you to the fact that you must take it to as close to how it's prescribed as possible, and will tell you what to do if you miss a dose.
When the timing of administration of life-saving drugs is critical, it's not uncommon to hospitalize a patient to assure such administration.
I have heard that the impact of medication lessens if the dosage is delayed, so how come sleep through the night without medication is okay?
That has all been calculated so that there is adequate and continuous coverage. The bacteria have no opportunity to "develop resistance" while you sleep.
Pharmacokinetics and Pharmacodynamics of Antibacterial Agents
The pharmacokinetics, pharmacodynamics and tolerability of dabigatran etexilate, a new oral direct thrombin inhibitor, in healthy male subjects <- An example of how pharmacodynamics are determied.