In the personal "first aid kit" of any "conscious" opium addict must be present an opioid receptor blocker, for example, Nolaxon - the main tool of the resuscitation team in such cases. If Nolaxon is not present, it is necessary to ensure uninterrupted artificial ventilation of the lungs and call an ambulance. And not necessarily the state, there is a huge number of paid private resuscitation teams "who ask no questions." In general, opiates are evil.
As with opioid overdose by other means (for example, intravenous heroin) - give an injection of naloxone (wikipedia.org). It blocks the action of morphine and is a fairly effective remedy for overdose. Naloxone is sold in pharmacies, but with a prescription, which is a bit odd. the procedure "wait for an overdose -> go to the pharmacy for a prescription" is difficult to implement.
You can take something accelerating and enjoy the swing. Seriously, with a mild overdose (the most common symptoms are you want to sleep and occasionally forget how to breathe), fresh air, light physical activity (for example, taking a walk), strong coffee or tea, and generally plenty of drink can help. If the overdose is serious, that is, the person no longer shows signs of life, then the only adequate way out is to lay him on his side so that he does not choke in case of involuntary vomiting, and call an ambulance.