The present invention provides a compound represented by the formula which is useful as an agent for the prophylaxis or treatment of diseases related to the action of melatonin, or a salt thereof and the like.本發明係提供一種下式所示之化合物或其鹽類等:該化合物係適用作預防或治療與褪黑激素作用有關疾病之藥劑。