When you assign the IDs you assign ItemIndex+1, but when you access the control in your command event you use ItemIndex. So your first box is myTextBox1 but your code looks for myTextBox0.
protected void myRepeater_ItemCommand(object source, RepeaterCommandEventArgs e)
{
if (e.CommandName == "myfunction")
{
string textbox = (e.Item.ItemIndex + 1).ToString();