The present disclosure relates to (thio)morpholine derivatives of the formula (I) or a pharmaceutically acceptable salt, a solvate or hydrate thereof; with the proviso that the derivative of formula (I) is not 2-(4-ethylphenyl)-4-morpholinoethanol or 4-[4-(2-hydroxyethyl)-2-morpholinyl]benzeneacetonitrile or a pharmaceutically acceptable salt, a solvate or hydrate thereof. The compounds of the disclosure have affinity to S1P receptors and may be used in the treatment, alleviation or prevention of S1P receptor mediated diseases and conditions.