As with many things in adult life, the question is not really "is it legal" but "could I get in trouble for doing this". And we all know the answer.