It's safe if you have a clear head and if you are capable of dealing with a strong trip. Even then, the worst that can happen is you have a really bad trip, and it's over with. There's really no strong side-effects attached to it.
It's legal only if you're using it for legitimate religious purposes. You can't just use it and say "Oh I was just using it to worship", you have to get approved and all that. Otherwise, it's not something you can use recreationally.