not just sex and drugs. Life isn't a series of pigeonholes that are separate from all the other pigeonholes, but a seamless whole. Morals don't have to do with just a sex pigeonhole. It's immoral to murder, kidnap, enslave, torture, rape, skin animals alive, practice reckless endangerment, steal, lie in court, and so forth.
"Morals, the practice of the duties of life; as a man of correct morals. 2. Conduct; behavior; course of life, in regard to good and evil."
"Moral; 1. Relating to the practice, manners, or conduct of men as social beings in relation to each other, and with reference to right and wrong.
"Having to do with virtue and ethics." --Definition quotes taken from Webster's Dictionary of the English Language, 1828
So, yes, laws against certain types of immoral behavior are legislating morality. Some immoral behaviors are crimes and need to be legislated, and other immoral behaviors are not crimes and must not be legislated.