Obviously there is a moral obligation for the president to stay sober. However, is there any law that ensures this is the case?
Well, moral obligations are not laws, nor sometimes even moral obligations. Some laws are based on what some courts and legislatures think are moral obligations.
We think cannibals have a moral obligation not to eat people; cannibals think non-cannibals are fools for passing up a good BBQ. As for a leader's moral responsibility for millions of lives, we can take as extreme examples Mao, Hilter, Stalin, Pol Pot, etc., that there are no obligations.
The law that could apply in the case of a POTUS who does not "faithfully execute the Office of President of the United States..." (oath of office for POTUS) is that of "High Crimes and Misdemeanors", the grounds for most impeachments.
But "faithfully executing the Office of President" has no moral obligation; it has legal implications, that's all. High crimes or misdemeanor are legal definitions, not moral, and depend on previous cases of what a crime or misdemeanor is.
Insobriety can be illegal; there are laws on the books concerning public drunkenness. But in the contest of POTUS (one who is hopefully not passed out on the sidewalk in front of the WH), it remains to be seen if insobriety is a high crime or misdemeanor. That would be up to the House Judiciary Committee and US House of Representatives, which by Constitutional powers handles impeachment proceedings.
The Twenty-fifth Amendment outlines who succeeds the president due to "Inability to discharge the Powers and Duties of the said Office," but it does not state who has the power to declare a President incapacitated.
It's possible that a POTUS who incapacitates himself with alcohol is guilty of a "high crime or misdemeanor." But how drunk do you have to be to be incapacitated? Drunk enough to think a Game Boy is the nuclear football? Again, that's up to the House.
Some past presidents have arguably been functional alcoholics (or functional recovered alcoholics.) But incapacitated? That can be subjective when it comes to the application of the law. And morals have little to do with it, unless those morals have a basis in that same law.
Update 12/04/16: Some federal judges have been impeached due to drunkenness: http://www.fjc.gov/history/home.nsf/page/judges_impeachments.html and http://www.crf-usa.org/impeachment/high-crimes-and-misdemeanors.html