The dosage of alprazolam (Xanax) for insomnia varies depending on various factors such as individual response, severity of insomnia, and previous medication history. It is crucial to consult with a healthcare professional who can assess your specific situation and prescribe the appropriate dosage.