In short, it absolutely does matter where you store medications. Storing your medications in an incorrect environment can destroy or change their effectiveness to the point where they may actually be dangerous to take. Experts recommend storing your medications at room temperature in a dry place out of direct sunlight. This means that one of the most common places to store medications, the bathroom cabinet, is actually one of the worst possible options. This is because it is often quite warm and humid in the bathroom, which will quickly change the composition of the medications themselves, even in their bottles.
The first step when determining how to store medications is to read the bottle. If they require refrigeration, then by all means keep them in the refrigerator, but otherwise keep your medicines out of the fridge or freezer. Instead, keep them in a closed cabinet in a room like an office or bedroom where the temperature stays relatively constant, and the humidity in the air does not fluctuate too greatly. Don't store them on the counter where they will be exposed to direct sunlight, and ensure that they are kept in a place that remains at a comfortable room temperature, or slightly cooler, to keep them at their maximum effectiveness.
It is also important to store medications carefully when traveling. If you will be traveling by plane, don't check your medications, because it can get very hot in the luggage bay. Instead, keep them in your carry-on. The same rules apply if you're traveling by car; don't put them in the trunk, but keep them in a bag or purse inside the car where it stays cooler. If your medicines will be mailed to you, be sure to choose overnight shipping for the same reasons, to minimize their exposure to different temperatures.
Experts also recommend taking steps to store medications purchased in bulk in smaller bottles. For instance, if you refill a few months' worth of a prescription at once, don't just take it in one big bottle; instead, put it in smaller bottles to minimize the amount of time the pills spend exposed to the air. If it's in one big bottle, for example, some of those pills would have been exposed to the air and temperature fluctuations on a daily basis for months, which could potentially change their effectiveness. Following these rules will help to ensure your medications stay fresh and are safe to take.