It's not a problem, though it's recommended to only use it in one orientation. i.e. If you install it level, don't change it to sit on its side at a later date. Or vice versa. The thinking is that the read/write heads are aligned with the data tracks in the initial orientation. If you change the orientation, the platters now shift slightly in their bearings, and the read/write heads are no longer aligned with the original tracks, possibly causing old data to become unreadable.
The bigger issue with a makeshift mounting like yours is to insure adequate airflow. HDDs don't need much cooling, but they do need some. I found this out the hard way when I removed my old hard drives from my desktop, put them on the desk (but plugged in), installed my new drives, and went to eat dinner while copying data from the old drives to the new. I came back to find the copy had failed. The SMART stats for the drives sitting on the desk said one drive hit 58 C, the other exceeded 60 C, at which point its firmware automatically shut it down.
Usually the hard drive cage sits behind a fan, or behind a vent and other fans pushing air out of the case pull in air through that vent over the HDDs. So make sure your drive (1) has adequate space between it and neighboring drives and surfaces for air to flow, (2) gets some airflow via a fan or vent, and (3) is not directly exposed to extremely hot components like a GPU.