It depends on the medication and what form it comes in (capsule, tablet,etc Also, some medications are lipid-soluble and therefore need to be digested before they work, while others are absorbed immediately into the bloodstream
actually those you just mentioned are the fast acting one, you have other drugs where it takes weeks for the effect to kick in ( ie: antidepressant, anti psychotics... it depends on the kinetics, absorption, and effectiveness of the drug
Medication is just like food - it has to be broken down, digested, and absorbed before you can feel anything from it. Your digestive process may be a little slower than others - maybe you have a slow metabolism. It also takes longer to kick in whether you eat a lot with whatever you take.