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)...