The present invention aims to provide a novel low-molecular-weight compound exhibiting an orexin receptor agonist activity and expected to be useful as a prophylactic or therapeutic agent for narcolepsy and the like. The present invention provides a compound represented by the formula (I):wherein each symbol is as defined in the description, or a pharmaceutically acceptable acid addition salt thereof, which has an orexin receptor agonist activity, and an orexin receptor agonist containing the compound or a pharmaceutically acceptable acid addition salt thereof.